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.
Value Description
ResultSuccess Process succeeded.
ResultNotInitialized The memory region has not been allocated.
ResultMisalignedSize The specified offset or size is not a multiple of 2.
ResultOutOfMemory The sum of the specified offset and size is larger than the allocated memory region.
ResultShellClose Cannot start sampling because the system is closed.

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/12/18
Revised the description of the return values.
2010/06/23
Added that GetSamplingBufferSize should be used to specify size.
2010/01/07
Initial version.

CONFIDENTIAL