# MIC_DoSampling

## C Specification

  `#include <nitro/spi.h>`

      MICResult MIC_DoSampling(
                  MICSamplingType  type,
                  void*            buf );

## Arguments

type | Sampling type of the MICSamplingType enumerator type
buf | Pointer to the buffer where the sampling result is stored

## Return Values

Returns the enumerated-type `MICResult` process result. If the asynchronous process started normally, returns `MIC_RESULT_SUCCESS`. If the process fails for some reason, returns some other value.

## Description

Samples the microphone one time. This function issues a request to the ARM7 processor to execute sampling, waits for the ARM7 processor to respond, and then returns the process result. This is the synchronous version of `MIC_DoSamplingAsync`. If the input volume exceeds the minimum or maximum value, the output data will be clamped. It is possible to adjust the input volume prior to sampling using the `PM_SetAmpGain` function.

## Caution

This function requires a PXI interrupt for synchronization. Do not call this function when PXI interrupts are prohibited.

## See Also

`MIC_DoSamplingAsync`, `PM_SetAmpGain`

## Revision History

03/08/2005 Standardized the Japanese term for "interrupt"
01/11/2005 Revised return values
08/10/2004 Added the description relating to the input volume
06/01/2004 Initial version

CONFIDENTIAL