USBMICStop

Syntax

#include <cafe/usb_mic.h>

int USBMICStop(usb_mic_handle_t h_mic);

Parameters

h_mic Instance handle returned via usb_event_data_t data structure through the event handler of type usb_event_handler_t that is provided as an argument to USBMICInit and will contain a valid instance handle when the USB microphone is attached.

Return Values

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

Description

Calling this function will stop the streaming of PCM data into the ring buffer that was provided to the USB UAC stack with USBMICOpen. Upon successful return from this function all streaming of PCM audio samples has stopped for the given device instance.

This function requires several milliseconds to complete, although much of that time is spent waiting on synchronization objects. It is not recommended to call this function from a timing sensitive thread.

For more information, see the overview on foreground and background switching and how to handle the required processing.

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

USBMICInit
USBMICOpen
USBMICStart
usb_mic_handle_t
Error Codes

Revision History

2013-05-08 Automated cleanup pass.
2012-08-03 Cleanup Pass
2012-07-09 Update for SDK2.06
2012-01-04 Initial version.


CONFIDENTIAL