# MIC_StartAutoSampling

## C Specification

  `#include <nitro/spi.h>`

      MICResult MIC_StartAutoSampling(
          const MICAutoParam* param );

## Description

This function starts microphone auto-sampling.

This function issues a request to the ARM7 processor to start auto-sampling, waits for the ARM7 processor to respond, and returns the process result.

This is the synchronous version of `MIC_StartAutoSamplingAsync`.

If the input volume exceeds the minimum or maximum value, the output data will be clamped. It is possible to adjust the input volume that can be sampled before hand using the `PM_SetAmpGain` function. Note that after the auto sampling starts, the input volume cannot be adjusted until the auto sampling is stopped.

Note: This function waits for a PXI interrupt in order to gain synchrony. Do not call this function if PXI interrupts have been prohibited. Also, do not operate other subprocessor peripherals (SPI device) during the microphone auto-sampling process.

It is possible to execute the one time sampling of the touch panel using the `TP_RequestCalibratedSampling`, `TP_RequestRawSampling`, and `TP_RequestSamplingAsync` functions during the microphone auto sampling process.

However, the one time sampling of the touch panel is executed the next time the microphone sampling ends. The touch panel may take longer than usual to respond.

## Arguments

`param` | Specifies a pointer to the MICAutoParam type auto-sampling setting structure.

## Return Values

0 if request succeeds.
Non-zero value if request fails.

## See Also

`MIC_StartAutoSamplingAsync`, `MIC_StopAutoSampling`, `MIC_StopAutoSamplingAsync`, `PM_SetAmpGain`

## Revision History

09/17/2004 Changed the type of the argument param
08/10/2001 Added the description to the touch panel sampling during the microphone auto sampling process. Added the description to the input volume.
06/01/2004 Initial version