MICClose

Syntax

#include <cafe/mic.h>

int MICClose(mic_handle_t h_mic);

Parameters

h_mic Handle returned from MICInit.

Return Values

A value of MIC_ERROR_NONE (zero) indicates success and any other value indicates the type of error that was encountered.

MIC_ERROR_INV_ARG is returned if an invalid handle is passed in. MIC_ERROR_NOT_INIT is returned when the MICClose is called before MICInit.

Description

Calling this function will stop the streaming of audio samples from the DRC microphone. All underlying drivers and resources are stopped and closed, leaving the associated hardware in a quiescent state. The shared ring buffer will no longer be touched by the DRC microphone driver. MICOpen can be called to restart the streaming of audio samples.

MICClose is a synchronous call and will take tens of milliseconds to execute, although much of the time is spent waiting on synchronization objects. This function is not meant to be called from timing sensitive threads.

The functionality of MICClose as well MICUninit is performed when the DRC becomes disconnected from the console or when a foreground background switch is performed.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also

mic_handle_t
MICInit
MICUninit
MICOpen
Error Codes

Revision History

2013/05/08 Automated cleanup pass.
2012/08/03 Cleanup Pass.
2012/06/08 Update to match SDK 2.06.
2011/10/27 Initial version.


CONFIDENTIAL