WPADSendStreamData

C Specification

#include <revolution/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 );
  

Arguments

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

Returns one of the following codes:

WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY

Description

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.

The return values have the following meanings:

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

See Also

WPAD Functions
WPADControlSpeaker

Revision History

2006/08/15 Initial version.


CONFIDENTIAL