From 6af1892f01b4e96b73f5ae0db288ca3c34cffc07 Mon Sep 17 00:00:00 2001
From: TravisCI-DocBuilder
Date: Sat, 7 Nov 2015 23:23:39 +0000
Subject: [PATCH] Doc generated from commit
7440ca79015e0480b7ceaea0731ccf92925947d4
---
apt_8h.html | 2 +-
audio_2mic_2source_2main_8c-example.html | 115 ++---
csnd_8h.html | 6 +-
gfx_8h.html | 8 +-
globals_enum.html | 6 +
globals_eval_m.html | 24 ++
globals_func_m.html | 68 +--
globals_m.html | 98 +++--
gsp_8h.html | 2 +-
hid_8h.html | 6 +-
linear_8h.html | 4 +-
mic_8h.html | 523 ++++++++++++++---------
mic_8h_source.html | 248 ++++++-----
13 files changed, 690 insertions(+), 420 deletions(-)
diff --git a/apt_8h.html b/apt_8h.html
index 30b3ecf..9ae3feb 100644
--- a/apt_8h.html
+++ b/apt_8h.html
@@ -2052,7 +2052,7 @@ Variables
Processes the current APT status.
Generally used within a main loop.
- Returns
- Whether the application is closing.
-- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
diff --git a/audio_2mic_2source_2main_8c-example.html b/audio_2mic_2source_2main_8c-example.html
index 51fe6c1..0fee17d 100644
--- a/audio_2mic_2source_2main_8c-example.html
+++ b/audio_2mic_2source_2main_8c-example.html
@@ -88,90 +88,97 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
int main()
{
-
- u32 *sharedmem = NULL, sharedmem_size = 0x30000;
-
- u32 audiobuf_size = 0x100000, audiobuf_pos = 0;
-
- u32 audio_initialized = 0;
-
-
+ bool initialized = true;
+
+ u32 micbuf_size = 0x30000;
+
+ u8* micbuf = memalign(micbuf_size, 0x1000);
+
+ printf("Initializing CSND...\n");
+
{
- printf("Init success\n");
- audio_initialized = 1;
- }
+ initialized = false;
+ printf("Could not initialize CSND.\n");
+ } else printf("CSND initialized.\n");
+
+ printf("Initializing MIC...\n");
+
+ {
+ initialized = false;
+ printf("Could not initialize MIC.\n");
+ } else printf("MIC initialized.\n");
- sharedmem = (
u32*)memalign(0x1000, sharedmem_size);
-
+
-
+ u32 audiobuf_size = 0x100000;
+
+
-
+ if(initialized) printf("Hold A to record, release to play.\n");
+ printf("Press START to exit.\n");
+
+
{
-
-
+
+
-
-
+
+
break;
- if(audio_initialized)
+ if(initialized)
{
-
-
-
+
{
audiobuf_pos = 0;
- printf("Stopping audio playback\n");
-
-
+ micbuf_pos = 0;
-
+ printf("Stopping audio playback...\n");
+
+
- memset(framebuf, 0x20, 0x46500);
- printf("Now recording\n");
+ printf("Starting sampling...\n");
+
+ else printf("Failed to start sampling.\n");
}
- if((
hidKeysHeld() & KEY_A) && audiobuf_pos < audiobuf_size)
+ if((
hidKeysHeld() & KEY_A) && audiobuf_pos < audiobuf_size)
{
- audiobuf_pos+=
MIC_ReadAudioData(&audiobuf[audiobuf_pos], audiobuf_size-audiobuf_pos, 1);
- if(audiobuf_pos > audiobuf_size)audiobuf_pos = audiobuf_size;
-
- memset(framebuf, 0x60, 0x46500);
+ u32 micbuf_readpos = micbuf_pos;
+
+ while(audiobuf_pos < audiobuf_size && micbuf_readpos != micbuf_pos)
+ {
+ audiobuf[audiobuf_pos] = micbuf[micbuf_readpos];
+ audiobuf_pos++;
+ micbuf_readpos = (micbuf_readpos + 1) % micbuf_datasize;
+ }
}
-
+
{
- printf("Playing the recorded sample\n");
-
-
-
+ printf("Stoping sampling...\n");
+
- memset(framebuf, 0xe0, 0x46500);
-
-
-
-
-
- memset(framebuf, 0xe0, 0x46500);
+ printf("Starting audio playback...\n");
+
+ else printf("Failed to start playback.\n");
}
}
-
-
+
+
}
-
-
-
+
- free(sharedmem);
-
+
+ free(micbuf);
-
+
+
return 0;
}
diff --git a/csnd_8h.html b/csnd_8h.html
index 51a92e6..28a7c84 100644
--- a/csnd_8h.html
+++ b/csnd_8h.html
@@ -1376,7 +1376,7 @@ Variables
-- Examples:
- audio/mic/source/main.c.
+- Examples:
- audio/mic/source/main.c.
@@ -1513,7 +1513,7 @@ Variables
-- Examples:
- audio/mic/source/main.c.
+- Examples:
- audio/mic/source/main.c.
@@ -1840,7 +1840,7 @@ Variables
In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size.
-- Examples:
- audio/mic/source/main.c.
+- Examples:
- audio/mic/source/main.c.
diff --git a/gfx_8h.html b/gfx_8h.html
index a7dcd84..a3dd895 100644
--- a/gfx_8h.html
+++ b/gfx_8h.html
@@ -249,7 +249,7 @@ Variables
Closes the gsp service and frees the framebuffers.
Just call it when you're done.
-- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, sdmc/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
@@ -269,7 +269,7 @@ Variables
Flushes the current framebuffers.
Use this if the data within your framebuffers changes a lot and that you want to make sure everything was updated correctly. This shouldn't be needed and has a significant overhead.
-- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
@@ -321,7 +321,7 @@ Variables
- Returns
- A pointer to the current framebuffer of the choosen screen.
Please remember that the returned pointer will change after each call to gfxSwapBuffers if double buffering is enabled.
-- Examples:
- audio/mic/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, http/source/main.c, mvd/source/main.c, qtm/source/main.c, and sdmc/source/main.c.
+- Examples:
- graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, http/source/main.c, mvd/source/main.c, qtm/source/main.c, and sdmc/source/main.c.
@@ -531,7 +531,7 @@ You should always call gfxSwapBuffers instead.
-- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
diff --git a/globals_enum.html b/globals_enum.html
index b75e40c..3087c98 100644
--- a/globals_enum.html
+++ b/globals_enum.html
@@ -339,6 +339,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
MemState
: svc.h
+MICU_Encoding
+: mic.h
+
+MICU_SampleRate
+: mic.h
+
mvdstdMode
: mvd.h
diff --git a/globals_eval_m.html b/globals_eval_m.html
index a9257d5..1fcfbec 100644
--- a/globals_eval_m.html
+++ b/globals_eval_m.html
@@ -217,6 +217,30 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
MEMSTATE_STATIC
: svc.h
+MICU_ENCODING_PCM16
+: mic.h
+
+MICU_ENCODING_PCM16_SIGNED
+: mic.h
+
+MICU_ENCODING_PCM8
+: mic.h
+
+MICU_ENCODING_PCM8_SIGNED
+: mic.h
+
+MICU_SAMPLE_RATE_10910
+: mic.h
+
+MICU_SAMPLE_RATE_16360
+: mic.h
+
+MICU_SAMPLE_RATE_32730
+: mic.h
+
+MICU_SAMPLE_RATE_8180
+: mic.h
+
MVDMODE_COLORFORMATCONV
: mvd.h
diff --git a/globals_func_m.html b/globals_func_m.html
index 6e8de84..7e49966 100644
--- a/globals_func_m.html
+++ b/globals_func_m.html
@@ -129,47 +129,59 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
mappableSpaceFree()
: mappable.h
-MIC_cmd3_Initialize()
-: mic.h
+micExit()
+: mic.h
-MIC_cmd5()
-: mic.h
+micGetLastSampleOffset()
+: mic.h
-MIC_GetCNTBit15()
-: mic.h
+micGetSampleDataSize()
+: mic.h
-MIC_GetControl()
-: mic.h
+micInit()
+: mic.h
-MIC_GetEventHandle()
-: mic.h
+MICU_AdjustSampling()
+: mic.h
-MIC_GetSharedMemOffsetValue()
-: mic.h
+MICU_GetClamp()
+: mic.h
-MIC_Initialize()
-: mic.h
+MICU_GetEventHandle()
+: mic.h
-MIC_IsRecoding()
-: mic.h
+MICU_GetGain()
+: mic.h
-MIC_MapSharedMem()
-: mic.h
+MICU_GetPower()
+: mic.h
-MIC_ReadAudioData()
-: mic.h
+MICU_IsSampling()
+: mic.h
-MIC_SetControl()
-: mic.h
+MICU_MapSharedMem()
+: mic.h
-MIC_SetRecording()
-: mic.h
+MICU_SetAllowShellClosed()
+: mic.h
-MIC_Shutdown()
-: mic.h
+MICU_SetClamp()
+: mic.h
-MIC_UnmapSharedMem()
-: mic.h
+MICU_SetGain()
+: mic.h
+
+MICU_SetPower()
+: mic.h
+
+MICU_StartSampling()
+: mic.h
+
+MICU_StopSampling()
+: mic.h
+
+MICU_UnmapSharedMem()
+: mic.h
mvdstdExit()
: mvd.h
diff --git a/globals_m.html b/globals_m.html
index a3c7413..cd99ab6 100644
--- a/globals_m.html
+++ b/globals_m.html
@@ -244,47 +244,89 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
MEMSTATE_STATIC
: svc.h
-MIC_cmd3_Initialize()
-: mic.h
+micExit()
+: mic.h
-MIC_cmd5()
-: mic.h
+micGetLastSampleOffset()
+: mic.h
-MIC_GetCNTBit15()
-: mic.h
+micGetSampleDataSize()
+: mic.h
-MIC_GetControl()
-: mic.h
+micInit()
+: mic.h
-MIC_GetEventHandle()
-: mic.h
+MICU_AdjustSampling()
+: mic.h
-MIC_GetSharedMemOffsetValue()
-: mic.h
+MICU_Encoding
+: mic.h
-MIC_Initialize()
-: mic.h
+MICU_ENCODING_PCM16
+: mic.h
-MIC_IsRecoding()
-: mic.h
+MICU_ENCODING_PCM16_SIGNED
+: mic.h
-MIC_MapSharedMem()
-: mic.h
+MICU_ENCODING_PCM8
+: mic.h
-MIC_ReadAudioData()
-: mic.h
+MICU_ENCODING_PCM8_SIGNED
+: mic.h
-MIC_SetControl()
-: mic.h
+MICU_GetClamp()
+: mic.h
-MIC_SetRecording()
-: mic.h
+MICU_GetEventHandle()
+: mic.h
-MIC_Shutdown()
-: mic.h
+MICU_GetGain()
+: mic.h
-MIC_UnmapSharedMem()
-: mic.h
+MICU_GetPower()
+: mic.h
+
+MICU_IsSampling()
+: mic.h
+
+MICU_MapSharedMem()
+: mic.h
+
+MICU_SAMPLE_RATE_10910
+: mic.h
+
+MICU_SAMPLE_RATE_16360
+: mic.h
+
+MICU_SAMPLE_RATE_32730
+: mic.h
+
+MICU_SAMPLE_RATE_8180
+: mic.h
+
+MICU_SampleRate
+: mic.h
+
+MICU_SetAllowShellClosed()
+: mic.h
+
+MICU_SetClamp()
+: mic.h
+
+MICU_SetGain()
+: mic.h
+
+MICU_SetPower()
+: mic.h
+
+MICU_StartSampling()
+: mic.h
+
+MICU_StopSampling()
+: mic.h
+
+MICU_UnmapSharedMem()
+: mic.h
MVDMODE_COLORFORMATCONV
: mvd.h
diff --git a/gsp_8h.html b/gsp_8h.html
index 6e61a1d..dc14d56 100644
--- a/gsp_8h.html
+++ b/gsp_8h.html
@@ -442,7 +442,7 @@ void audio/mic/source/main.c, and mvd/source/main.c.
+- Examples:
- audio/mic/source/main.c, and mvd/source/main.c.
diff --git a/hid_8h.html b/hid_8h.html
index b6a2ef1..87cea26 100644
--- a/hid_8h.html
+++ b/hid_8h.html
@@ -520,7 +520,7 @@ Variables |
Gets keys that were just pressed.
Individual keys can be checked by ORing them with this value.
- Returns
- Keys down.
-- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
+- Examples:
- app_launch/source/main.c, audio/mic/source/main.c, get_system_language/source/main.c, graphics/bitmap/24bit-color/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, graphics/printing/both-screen-text/source/main.c, graphics/printing/colored-text/source/main.c, graphics/printing/hello-world/source/main.c, graphics/printing/multiple-windows-text/source/main.c, http/source/main.c, input/read-controls/source/main.c, input/touch-screen/source/main.c, libapplet_launch/source/main.c, mvd/source/main.c, qtm/source/main.c, threads/event/source/main.c, and time/rtc/source/main.c.
@@ -540,7 +540,7 @@ Variables
Gets the currently held keys.
Individual keys can be checked by ORing them with this value.
- Returns
- Keys held.
-- Examples:
- audio/mic/source/main.c, and input/read-controls/source/main.c.
+- Examples:
- audio/mic/source/main.c, and input/read-controls/source/main.c.
@@ -560,7 +560,7 @@ Variables
Gets keys that were just released.
Individual keys can be checked by ORing them with this value.
- Returns
- Keys up.
-- Examples:
- audio/mic/source/main.c, and input/read-controls/source/main.c.
+- Examples:
- audio/mic/source/main.c, and input/read-controls/source/main.c.
diff --git a/linear_8h.html b/linear_8h.html
index b0d684c..c92452a 100644
--- a/linear_8h.html
+++ b/linear_8h.html
@@ -141,7 +141,7 @@ Functions
- Returns
- The allocated buffer.
-- Examples:
- audio/mic/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, and mvd/source/main.c.
+- Examples:
- audio/mic/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, and mvd/source/main.c.
@@ -166,7 +166,7 @@ Functions
-- Examples:
- audio/mic/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, and mvd/source/main.c.
+- Examples:
- audio/mic/source/main.c, graphics/gpu/geoshader/source/main.c, graphics/gpu/simple_tri/source/main.c, graphics/gpu/textured_cube/source/main.c, and mvd/source/main.c.
diff --git a/mic_8h.html b/mic_8h.html
index 20bc7e7..5ff489d 100644
--- a/mic_8h.html
+++ b/mic_8h.html
@@ -87,6 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
+
+
+
Microphone audio encodings.
+
+Enumerator |
---|
MICU_ENCODING_PCM8 |
+ Unsigned 8-bit PCM.
+ |
+MICU_ENCODING_PCM16 |
+ Unsigned 16-bit PCM.
+ |
+MICU_ENCODING_PCM8_SIGNED |
+ Signed 8-bit PCM.
+ |
+MICU_ENCODING_PCM16_SIGNED |
+ Signed 16-bit PCM.
+ |
+
+
+
+
+
+
+
+
+
Microphone audio sampling rates.
+
+Enumerator |
---|
MICU_SAMPLE_RATE_32730 |
+ 32730 Hz
+ |
+MICU_SAMPLE_RATE_16360 |
+ 16360 Hz
+ |
+MICU_SAMPLE_RATE_10910 |
+ 10910 Hz
+ |
+MICU_SAMPLE_RATE_8180 |
+ 8180 Hz
+ |
+
+
+
+
+
+
+
+
+
- |
+ u32 micGetLastSampleOffset |
+ ( |
+ void |
+ | ) |
|
- u32 |
- sharedmem_baseoffset, |
+
+
+
+
Gets the offset within the shared memory buffer of the last sample written.
+
- Returns
- The last sample's offset.
+
- Examples:
- audio/mic/source/main.c.
+
+
+
+
+
+
+
- |
+ u32 micGetSampleDataSize |
+ ( |
+ void |
+ | ) |
|
- u32 |
- sharedmem_endoffset, |
+
+
+
+
+
Gets the size of the sample data area within the shared memory buffer.
+
- Returns
- The sample data's size.
+
- Examples:
- audio/mic/source/main.c.
+
+
+
+
+
+
+
+
+ Result micInit |
+ ( |
+ u8 * |
+ buffer, |
|
|
- u8 |
- unk2 |
+ u32 |
+ bufferSize |
|
@@ -194,72 +313,69 @@ Functions
Initializes MIC.
- Parameters
-
- unk0 | Unknown. |
- unk1 | Unknown. |
- sharedmem_baseoffset | Base offset of shared memory. |
- sharedmem_endoffset | End offset of shared memory. |
- unk2 | Unknown. |
+ size | Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes. |
+ handle | Size of the shared memory buffer. |
-
+- Examples:
- audio/mic/source/main.c.
+
-
+
-
Gets CNT bit 15 from MIC.
+
Adjusts the configuration of the current sampling session.
- Parameters
-
- out | Pointer to output the bit to. |
+ sampleRate | Sample rate of outputted audio. |
-
+
- Result MIC_GetControl |
+ Result MICU_GetClamp |
( |
- u8 * |
- value | ) |
+ bool * |
+ clamp | ) |
|
-
Gets the control value.
-
- Note
- Bits 0-6 = Amplification.
+
Gets whether to clamp microphone input.
- Parameters
-
- value | Pointer to output the control value to. |
+ clamp | Pointer to output the clamp state to. |
-
+
- Result MIC_GetEventHandle |
+ Result MICU_GetEventHandle |
( |
Handle * |
handle | ) |
@@ -268,7 +384,7 @@ Functions
-
Gets the event handle signaled by MIC when data is ready.
+
Gets an event handle triggered when the shared memory buffer is full.
- Parameters
-
handle | Pointer to output the event handle to. |
@@ -278,134 +394,93 @@ Functions
-
+
- u32 MIC_GetSharedMemOffsetValue |
+ Result MICU_GetGain |
( |
- void |
- | ) |
+ u8 * |
+ gain | ) |
|
-
Gets the current shared memory offset.
-
- Returns
- The current shared memory offset.
+
Gets the microphone's gain.
+
- Parameters
-
+
+ gain | Pointer to output the current gain to. |
+
+
+
-
+
- Result MIC_Initialize |
+ Result MICU_GetPower |
( |
- u32 * |
- sharedmem, |
-
-
- |
- |
- u32 |
- sharedmem_size, |
-
-
- |
+ bool * |
+ power | ) |
|
- u8 |
- control, |
-
-
- |
- |
- u8 |
- recording, |
-
-
- |
- |
- u8 |
- unk0, |
-
-
- |
- |
- u8 |
- unk1, |
-
-
- |
- |
- u8 |
- unk2 |
-
-
- |
- ) |
- | |
-
Initializes MIC.
+
Gets whether the microphone is powered on.
- Parameters
-
- sharedmem | Shared memory block to use. Must be 0x1000-bytes aligned. |
- sharedmem_size | Size of the shared memory block to use. (audiodata size + 4, aligned to 0x1000-bytes) |
- control | Control value. Bits 0-6 = Amplification. |
- unk0 | Unknown. Typically 3. |
- unk1 | Unknown. Typically 1. |
- unk2 | Unknown. Typically 1. |
+ power | Pointer to output the power state to. |
-
- Examples:
- audio/mic/source/main.c.
-
+
-
+
- Result MIC_IsRecoding |
+ Result MICU_IsSampling |
( |
- u8 * |
- value | ) |
+ bool * |
+ sampling | ) |
|
-
Gets whether the microphone is recording.
+
Gets whether microphone input is currently being sampled.
- Parameters
-
- value | Pointer to output whether the microphone is recording to. |
+ sampling | Pointer to output the sampling state to. |
-
+
- Result MIC_MapSharedMem |
+ Result MICU_MapSharedMem |
( |
- Handle |
- handle, |
+ u32 |
+ size, |
|
|
- u32 |
- size |
+ Handle |
+ handle |
|
@@ -415,104 +490,107 @@ Functions
-
Maps MIC's shared memory.
+
Maps MIC shared memory.
- Parameters
-
- handle | Handle of the shared memory. |
size | Size of the shared memory. |
+ handle | Handle of the shared memory. |
-
+
- u32 MIC_ReadAudioData |
+ Result MICU_SetAllowShellClosed |
( |
- u8 * |
- outbuf, |
-
-
- |
- |
- u32 |
- readsize, |
-
-
- |
+ bool |
+ allowShellClosed | ) |
|
- u32 |
- waitforevent |
+
+
+
+
Sets whether to allow sampling when the shell is closed.
+
- Parameters
-
+
+ allowShellClosed | Whether to allow sampling when the shell is closed. |
+
+
+
+
+
+
+
+
+
+
+ Result MICU_SetClamp |
+ ( |
+ bool |
+ clamp | ) |
|
- ) |
- | |
-
Reads MIC audio data.
+
Sets whether to clamp microphone input.
- Parameters
-
- outbuf | Buffer to write audio data to. |
- readsize | Size of the buffer to write to. |
- waitforevent | Whether to wait for the MIC service to signal that audio data is ready. (non-zero = wait) |
+ clamp | Whether to clamp microphone input. |
-
- Returns
- Actual number of bytes read.
-
- Examples:
- audio/mic/source/main.c.
-
+
-
+
-
Sets the control value.
-
- Note
- Bits 0-6 = Amplification.
+
Sets the microphone's gain.
- Parameters
-
- value | Control value to set. |
+ gain | Gain to set. |
-
+
- Result MIC_SetRecording |
+ Result MICU_SetPower |
( |
- u8 |
- value | ) |
+ bool |
+ power | ) |
|
-
Sets whether the microphone is recording.
+
Sets whether the microphone is powered on.
- Parameters
-
- value | Whether the microphone is recording. |
+ power | Whether the microphone is powered on. |
@@ -520,6 +598,63 @@ Functions
+
+
+
+
+
Begins sampling microphone input.
+
- Parameters
-
+
+ encoding | Encoding of outputted audio. |
+ sampleRate | Sample rate of outputted audio. |
+ sharedMemAudioOffset | Offset to write audio data to in the shared memory buffer. |
+ sharedMemAudioSize | Size of audio data to write to the shared memory buffer. This should be at most "bufferSize - 4". |
+ loop | Whether to loop back to the beginning of the buffer when the end is reached. |
+
+
+
+
- Examples:
- audio/mic/source/main.c.
+
+
+