WPADControlSpeaker

C Specification

#include <revolution/wpad.h>

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

#define WPAD_SPEAKER_OFF         0
#define WPAD_SPEAKER_ON          1
#define WPAD_SPEAKER_MUTE        2
#define WPAD_SPEAKER_MUTE_OFF    3
#define WPAD_SPEAKER_PLAY        4

typedef void (*WPADCallback) ( s32 chan, s32 result );

s32 WPADControlSpeaker( s32 chan, u32 command, WPADCallback callback );

Arguments

chan One of WPAD_CHANn values.
pattern Set to one of WPAD_SPEAKER_OFF, WPAD_SPEAKER_ON, WPAD_SPEAKER_MUTE, WPAD_SPEAKER_MUTE_OFF, or WPAD_SPEAKER_PLAY.
callback Callback function to notify about the result. Notification processing is omitted if NULL is specified.

Return Values

Returns one of the following codes:

WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY

Description

Controls the speaker of the Wii Remote Control on the specified channel. This function registers the speaker control command in the library. The WPAD library processes registered commands when other commands are not running.

To output audio from the speaker on the Wii Remote, first start the speaker using the WPAD_SPEAKER_ON command. Next, audio can be output from the speaker using the WPAD_SPEAKER_PLAY command. Sending audio data using the WPADSendStreamData at this time will cause audio to be output from the speaker of the Wii Remote.

See Also

WPAD Functions
WPADIsSpeakerEnabled
WPADSendStreamData

Revision History

08/15/2006 Initial version.


CONFIDENTIAL