nn::mic::CTR::SetClamp Function

Syntax

Result SetClamp(
     bool enable
);

Arguments

Name Description
in enable When true, clamping is enabled. (The default is true.)

Return Values

Returns the result of the operation.
Value Description
ResultSuccess Process succeeded.

Description

Configures whether microphone data will be clamped.

The ideal is for the full range of microphone data input to be accepted, but in actual practice variations in microphones occur. A microphone's guaranteed input range is defined as the range for which input is guaranteed, regardless of the microphone.

When this function is called with a true argument, clamping is performed for the value of the microphone's guaranteed input range. Always use clamping to avoid problems that could be caused by differences in microphones.

When a broader range is necessary, you can disable clamping. In that case, note that it is possible that you may be unable to get values outside the microphone's guaranteed input range.

See the following for the microphone's guaranteed input range based on the sampling type.
nn::mic::CTR::TYPE_8BIT_GUARANTEED_INPUT_MIN,
nn::mic::CTR::TYPE_8BIT_GUARANTEED_INPUT_MAX,
nn::mic::CTR::TYPE_16BIT_GUARANTEED_INPUT_MIN,
nn::mic::CTR::TYPE_16BIT_GUARANTEED_INPUT_MAX,
nn::mic::CTR::TYPE_SIGNED_8BIT_GUARANTEED_INPUT_MIN,
nn::mic::CTR::TYPE_SIGNED_8BIT_GUARANTEED_INPUT_MAX,
nn::mic::CTR::TYPE_SIGNED_16BIT_GUARANTEED_INPUT_MIN,
nn::mic::CTR::TYPE_SIGNED_16BIT_GUARANTEED_INPUT_MAX,

If this function is called while sampling is already under way, the settings are applied to the position currently being written and to all later positions.

Revision History

2010/12/18
Revised the description of the return values.
2010/10/15
Initial version.

CONFIDENTIAL