mirror of
https://github.com/devkitPro/wut.git
synced 2026-03-21 17:34:47 -05:00
Add declarations for some Wiimote audio stuff, +documentation (#433)
* Add declarations for some Wiimote audio stuff, +documentation * Small comment changes
This commit is contained in:
parent
49fe30fe49
commit
26ed8f3b39
|
|
@ -741,7 +741,7 @@ struct WPADAddress
|
||||||
WUT_CHECK_OFFSET(WPADAddress, 0x00, btDeviceAddress);
|
WUT_CHECK_OFFSET(WPADAddress, 0x00, btDeviceAddress);
|
||||||
WUT_CHECK_SIZE(WPADAddress, 0x6);
|
WUT_CHECK_SIZE(WPADAddress, 0x6);
|
||||||
|
|
||||||
//! Continuation parameters for WENCGetEncodeData
|
//! Continuation parameters for \link WENCGetEncodeData
|
||||||
struct WENCParams
|
struct WENCParams
|
||||||
{
|
{
|
||||||
WUT_UNKNOWN_BYTES(32);
|
WUT_UNKNOWN_BYTES(32);
|
||||||
|
|
@ -909,11 +909,12 @@ WPADSendStreamData(WPADChan channel,
|
||||||
* Encode 16-bit LPCM as 4-bit Yamaha ADPCM
|
* Encode 16-bit LPCM as 4-bit Yamaha ADPCM
|
||||||
* \param params encoding continuation params, written on first call, and read and updated on each subsequent call
|
* \param params encoding continuation params, written on first call, and read and updated on each subsequent call
|
||||||
* \param continuing should be TRUE if continuing encoding stream with the params produced via a prior call
|
* \param continuing should be TRUE if continuing encoding stream with the params produced via a prior call
|
||||||
* \param samples 16-bit LPCM sample buffer
|
* \param [in] samples 16-bit LPCM sample buffer
|
||||||
* \param sampleCount number of 16-bit LPCM samples
|
* \param sampleCount number of 16-bit LPCM samples
|
||||||
* \param outEncodedData buffer for the returned adpcm samples, buffer size should be equal to {(sampleCount + 1) / 2}
|
* \param [out] outEncodedData buffer for the returned ADPCM samples, size should be {(sampleCount + 1) / 2}
|
||||||
* \return Number of LPCM-16 samples
|
* \return Number of LPCM-16 samples
|
||||||
*
|
*
|
||||||
|
* \sa AXRmtGetSamples
|
||||||
* \sa WPADSendStreamData
|
* \sa WPADSendStreamData
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
|
|
|
||||||
56
include/sndcore2/rmt.h
Normal file
56
include/sndcore2/rmt.h
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup sndcore2_rmt Remote
|
||||||
|
* \ingroup sndcore2
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
/**
|
||||||
|
* Consume samples for all Wiimotes
|
||||||
|
* \param count number of samples to consume
|
||||||
|
* \return number of samples actually consumed
|
||||||
|
*
|
||||||
|
* \see AXRmtGetSamplesLeft
|
||||||
|
* \see AXRmtGetSamples
|
||||||
|
* \note
|
||||||
|
* Reduces number of available samples
|
||||||
|
*/
|
||||||
|
uint32_t
|
||||||
|
AXRmtAdvancePtr(uint32_t count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets 16-bit LPCM samples queued for a Wiimote
|
||||||
|
* \param index WPAD channel of the device (0 - 3)
|
||||||
|
* \param [out] samples 16-bit LPCM samples queued for specified device
|
||||||
|
* \param sampleCount requested number of samples
|
||||||
|
* \return actual number of 16-bit LPCM samples obtained
|
||||||
|
*
|
||||||
|
* \see WENCGetEncodeData
|
||||||
|
* \see AXRmtGetSamplesLeft
|
||||||
|
* \see AXRmtAdvancePtr
|
||||||
|
* \see AXSetVoiceRmtOn
|
||||||
|
* \note
|
||||||
|
* Samples can be obtained while a voice with remote output enabled is playing
|
||||||
|
*/
|
||||||
|
uint32_t
|
||||||
|
AXRmtGetSamples(uint32_t index, int16_t *samples, uint32_t sampleCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get number of samples currently available to Wiimotes
|
||||||
|
* \return number of available samples
|
||||||
|
*
|
||||||
|
* \see AXRmtGetSamples
|
||||||
|
* \see AXRmtAdvancePtr
|
||||||
|
*/
|
||||||
|
uint32_t
|
||||||
|
AXRmtGetSamplesLeft();
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
@ -377,6 +377,16 @@ void
|
||||||
AXSetVoiceVeDelta(AXVoice *voice,
|
AXSetVoiceVeDelta(AXVoice *voice,
|
||||||
int16_t delta);
|
int16_t delta);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable generating samples for Wiimotes
|
||||||
|
* \param voice voice to generate samples from
|
||||||
|
* \param on set TRUE to generate samples for Wiimotes
|
||||||
|
*
|
||||||
|
* \see AXRmtGetSamples
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
AXSetVoiceRmtOn(AXVoice *voice, uint16_t on);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user