#include <cafe/pads/wpad/wpad.h>

#define WPAD_CHAN0               0
#define WPAD_CHAN1               1
#define WPAD_CHAN2               2
#define WPAD_CHAN3               3

#define WPAD_STRM_INTERVAL       OSNanosecondsToTicks(6666667)

s32 WPADSendStreamData( s32 chan, void *buf, u16 len );


chan One of the WPAD_CHANn values.
buf Start address of the buffer storing audio data.
len Size of the audio data. A size from 1 to 20 bytes can be specified.

Return Values

WPAD_ERR_NONEThe WPAD library accepted a command.
WPAD_ERR_NO_CONTROLLERThe connection was broken.
WPAD_ERR_BUSYThe WPAD library did not accept the command.


Sends audio data of 1 to 20 bytes in length to the Wii remote on the specified channel. Because the Wii remote can play 4-bit, 6-kHz audio data, be sure to send 20 bytes of data every time interval given by WPAD_STRM_INTERVAL.

This function registers the command used to send audio data to the library. The WPAD library processes registered commands when other commands are not running. The processing result of the command for sending audio data registered using this function cannot be obtained.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

See Also


Revision History

2013/05/08 Automated cleanup pass.
2006/08/15 Initial version.