Result micInit(u8 *buffer, u32 bufferSize)
Initializes MIC.
u32 micGetSampleDataSize(void)
Gets the size of the sample data area within the shared memory buffer.
Result MICU_SetClamp(bool clamp)
Sets whether to clamp microphone input.
Result MICU_SetGain(u8 gain)
Sets the microphone's gain.
Result MICU_GetPower(bool *power)
Gets whether the microphone is powered on.
Result MICU_SetPower(bool power)
Sets whether the microphone is powered on.
Result MICU_MapSharedMem(u32 size, Handle handle)
Maps MIC shared memory.
MICU_Encoding
Microphone audio encodings.
Definition: mic.h:9
@ MICU_ENCODING_PCM16
Unsigned 16-bit PCM.
Definition: mic.h:11
@ MICU_ENCODING_PCM8
Unsigned 8-bit PCM.
Definition: mic.h:10
@ MICU_ENCODING_PCM8_SIGNED
Signed 8-bit PCM.
Definition: mic.h:12
@ MICU_ENCODING_PCM16_SIGNED
Signed 16-bit PCM.
Definition: mic.h:13
Result MICU_IsSampling(bool *sampling)
Gets whether microphone input is currently being sampled.
void micExit(void)
Exits MIC.
Result MICU_StartSampling(MICU_Encoding encoding, MICU_SampleRate sampleRate, u32 offset, u32 size, bool loop)
Begins sampling microphone input.
Result MICU_StopSampling(void)
Stops sampling microphone input.
Result MICU_GetEventHandle(Handle *handle)
Gets an event handle triggered when the shared memory buffer is full.
Result MICU_SetAllowShellClosed(bool allowShellClosed)
Sets whether to allow sampling when the shell is closed.
u32 micGetLastSampleOffset(void)
Gets the offset within the shared memory buffer of the last sample written.
Result MICU_UnmapSharedMem(void)
Unmaps MIC shared memory.
Result MICU_GetGain(u8 *gain)
Gets the microphone's gain.
MICU_SampleRate
Microphone audio sampling rates.
Definition: mic.h:18
@ MICU_SAMPLE_RATE_16360
16364.479 Hz
Definition: mic.h:20
@ MICU_SAMPLE_RATE_8180
8182.1245 Hz
Definition: mic.h:22
@ MICU_SAMPLE_RATE_32730
32728.498 Hz
Definition: mic.h:19
@ MICU_SAMPLE_RATE_10910
10909.499 Hz
Definition: mic.h:21
Result MICU_GetClamp(bool *clamp)
Gets whether to clamp microphone input.
Result MICU_AdjustSampling(MICU_SampleRate sampleRate)
Adjusts the configuration of the current sampling session.
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint32_t u32
32-bit unsigned integer
Definition: types.h:23