nn::mic::CTR Namespace

Description

The namespace of the CTR microphone library. (This namespace can also be written without the ::CTR portion.)

If microphone sampling is running when the system is closed, it stops sampling automatically and will then resume sampling automatically when the system is opened. This behavior is unrelated to Sleep Mode: it is triggered when you open or close the system.

Classes

Result
nn::mic::CTR::ResultShellClose The microphone cannot be used because the system is closed.
nn::mic::CTR::ResultNotInitialized A function was called prior to the requisite initialization.
nn::mic::CTR::ResultAlreadyInitialized There was an attempt to run initialization even though this had already been done.
nn::mic::CTR::ResultUsingOtherProcess The microphone library cannot be used because another process is using the microphone.
nn::mic::CTR::ResultBusy Processing is not possible because microphone sampling is running.
nn::mic::CTR::ResultMisalignedSize The specified size has an invalid alignment.
nn::mic::CTR::ResultMisalignedAddress The specified address has an invalid alignment.
nn::mic::CTR::ResultOutOfMemory An invalid position was specified for the memory region that stores the sampling results.
nn::mic::CTR::ResultInvalidSize An invalid size was specified.
nn::mic::CTR::ResultInvalidHandle The specified memory region is invalid.

Enumerated Types

SamplingType Enumerated type that indicates the microphone sampling type.
SamplingRate Enumerated type that indicates the microphone sampling rate.

Constants

AMP_GAIN_MAX const u8 Constant that indicates the maximum gain for the microphone amp. Defined as 119 (70.0 dB).
AMP_GAIN_MIN const u8 Constant that indicates the maximum gain for the microphone amp. Defined as 0 (10.5 dB).
BUFFER_ALIGNMENT_ADDRESS const s32 Constant that indicates the alignment of the address of the memory region set using SetBuffer. It is defined as 4096 bytes.
BUFFER_ALIGNMENT_SIZE const s32 Constant that indicates the alignment of the size of the memory region set using SetBuffer. It is defined as 4096 bytes.
SAMPLING_TYPE_8BIT_SILENT_DATA const u8 Constant representing the silence value for SAMPLING_TYPE_8BIT.
SAMPLING_TYPE_16BIT_SILENT_DATA const u16 Constant representing the silence value for SAMPLING_TYPE_16BIT.
SAMPLING_TYPE_SIGNED_8BIT_SILENT_DATA const s8 Constant representing the silence value for SAMPLING_TYPE_SIGNED_8BIT.
SAMPLING_TYPE_SIGNED_16BIT_SILENT_DATA const s16 Constant representing the silence value for SAMPLING_TYPE_SIGNED_16BIT.
TYPE_8BIT_GUARANTEED_INPUT_MIN const u8 Constant representing the minimum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_8BIT. It has a value of 27.
TYPE_8BIT_GUARANTEED_INPUT_MAX const u8 Constant representing the maximum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_8BIT. It has a value of 228.
TYPE_16BIT_GUARANTEED_INPUT_MIN const u16 Constant representing the minimum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_16BIT. It has a value of 7105.
TYPE_16BIT_GUARANTEED_INPUT_MAX const u16 Constant representing the maximum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_16BIT. It has a value of 58415.
TYPE_SIGNED_8BIT_GUARANTEED_INPUT_MIN const s8 Constant representing the minimum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_SIGNED_8BIT. It has a value of -101.
TYPE_SIGNED_8BIT_GUARANTEED_INPUT_MAX const s8 Constant representing the maximum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_SIGNED_8BIT. It has a value of 100.
TYPE_SIGNED_16BIT_GUARANTEED_INPUT_MIN const s16 Constant representing the minimum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_SIGNED_16BIT. It has a value of -25663.
TYPE_SIGNED_16BIT_GUARANTEED_INPUT_MAX const s16 Constant representing the maximum value of the guaranteed input range for microphone input values obtained with SAMPLING_TYPE_SIGNED_16BIT. It has a value of 25647.
AMP_GAIN_DEFAULT_VALUE const u8 Constant that indicates the initial value configured for microphone amp gain. Defined as 43 (32 dB). This value is configured even after calling the nn::mic::CTR::Finalize function.

Functions

Other
Initialize Initializes the MIC library and enables the microphone for use.
Finalize Finalizes the MIC library.
SetBuffer Sets the memory region in which to store the sampling results.
ResetBuffer Prevents the memory region set using nn::mic::CTR::SetBuffer from being used by the MIC library.
GetSamplingBufferSize Returns the size of the sampling results that will be saved within the memory region set using nn::mic::CTR::SetBuffer.
StartSampling Starts microphone auto-sampling.
StopSampling Stops microphone auto-sampling.
AdjustSampling Changes the sampling rate for microphone auto-sampling.
IsSampling Determines whether microphone sampling is currently under way.
GetLastSamplingAddress Gets the address at which the most recent microphone sampling results are stored.
GetBufferFullEvent Gets the manually resetting event used to detect when the microphone buffer is full.
SetAmpGain Sets the microphone amp's gain.
GetAmpGain Gets the microphone amp's gain.
SetAmp Sets the ON/OFF setting for power to the microphone.
GetAmp Gets the ON/OFF setting for power to the microphone.
GetForbiddenArea Gets the maximum and minimum values for a region within which it is prohibited to determine that there is microphone input, given a gain and sampling type. Do not determine that there is microphone input between these upper and lower limits.
SetLowPassFilter Sets the low-pass filter to apply to microphone input data.
SetClamp Configures whether to clamp microphone data.
GetClamp Gets the clamping settings for microphone data.

Revision History

2010/12/18
Added Result values. Added a description of operations when the system is opened and closed.
2010/10/15
Added SetClamp and GetClamp.
2010/06/23
Deleted AllocateBuffer and FreeBuffer. Added SetBuffer, ResetBuffer, and GetSamplingBufferSize.
2010/01/07
Initial version.

CONFIDENTIAL