mic.rpl is the library for communicating with the Wii U GamePad microphone.
Functions
Name |
Prototype |
Description
|
MICInit |
MICHandle MICInit(MICInstance instance, int unused, MICWorkMemory *workMemory, MICError *outError) |
Initialises the MIC library. The second parameter is unused and any value is valid.
|
MICOpen |
MICError MICOpen(MICHandle handle) |
Starts the streaming of audio data from the specified GamePad's microphone.
|
MICGetState |
MICError MICGetState(MICHandle handle, int state, uint32_t *outStateVal) |
Queries and returns the current microphone state through outStateVal
|
MICSetState |
MICError MICSetState(MICHandle handle, int state, uint32_t stateVal) |
Sets the current microphone state.
|
MICGetStatus |
MICError MICGetStatus(MICHandle handle, MICStatus *outStatus) |
Queries and returns the current microphone status through outStatus
|
MICSetDataConsumed |
MICError MICSetDataConsumed(MICHandle handle, int dataAmountConsumed) |
|
MICClose |
MICError MICClose(MICHandle handle) |
Stops the current streaming of audio data from the GamePad microphone.
|
MICUninit |
MICError MICUninit(MICHandle handle) |
Uninitialises the MIC library.
|
Defines
Enums
MICError
Name |
Value
|
MIC_ERROR_OK |
0
|
MIC_ERROR_NOT_OPENED |
-1
|
MIC_ERROR_INVALID_HANDLE |
-2
|
MIC_ERROR_INIT |
-5
|
MIC_ERROR_ALREADY_CLOSED |
-7
|
MIC_ERROR_INVALID_INSTANCE |
-8
|
MICInstance
Name |
Value
|
MIC_INSTANCE_0 |
0
|
MIC_INSTANCE_1 |
1
|
Structs
MICWorkMemory
struct MICWorkMemory
{
//! Maximum amount of samples at a time must be at least 0x2800.
size_t sampleMaxCount;
//! A 0x40 aligned buffer of size sampleMaxCount * 2.
void *sampleBuffer;
}
MICStatus
struct MICStatus
{
int state; // 1 << 1 = Open
int availableData;
int bufferPos;
}