nn::mic::CTR::StartSampling Function

Syntax

Result StartSampling(
     SamplingType type,
     SamplingRate rate,
     s32                 offset,
     size_t size,
     bool loop
);

Arguments

Name Description
in type Specifies the sampling type.
in rate Specifies the sampling frequency.
in offset Position from the start of the memory region where the first of the sampling results are stored. You must specify a position (in bytes) that is a multiple of two.
in size The size within the memory region where the sampling results will be stored. Specify a size less than or equal to the value obtained using nn::mic::CTR::GetSamplingBufferSize.
You must specify a size that is a multiple of two.
in loop Flag that specifies whether or not to reuse (loop through) the memory region after sampling size bytes.
If true, sampling continues and loops through the region. After size bytes have been sampled, sampling loops back to the offset position and there continues from where it left off.
If false, sampling stops automatically after size bytes have been sampled.

Return Values

Returns the result of the operation.
LEVEL_SUCCESS:SUMMARY_SUCCESS:MODULE_COMMON:DESCRIPTION_SUCCESS: Success.
LEVEL_PERMANENT:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_NOT_INITIALIZED: The memory region has not been allocated.
LEVEL_USAGE:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_MISALIGNED_SIZE: The offset or size value specified is not a multiple of two. LEVEL_USAGE:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_OUT_OF_MEMORY : The sum of the specified offset and size values exceeds the size of the memory region that has been allocated.

Description

Starts microphone auto-sampling.

If microphone auto-sampling has already been started, this function stops the active sampling session and starts a new one.

Revision History

2010/06/23
Added that GetSamplingBufferSize should be used to specify size.
2010/01/07
Initial version.

CONFIDENTIAL