#include <cafe/usb_mic.h> int USBMICStart(usb_mic_handle_t h_mic);
|h_mic||Instance handle returned via
A value of zero indicates success and any other value the type of error that was encountered.
Calling this function will start the streaming of PCM data into the ring buffer that was provided
to the USB UAC stack with
This function will only succeed if the USB UAC stack has been successfully opened via
If, for some reason, the caller of this function cannot keep up with the rate of inflowing data, then the oldest audio samples in the ring buffer will be overwritten.
To assure that a sufficient number of audio samples are in the shared ring buffer,
a caller must call
to query that a sufficient number of audio samples are present.
This function is affected by foreground/background switching. Upon releasing foreground, an
application is required to call
USBMICUninit to fully shut down the UAC driver
stack. When foreground status is reacquired, an application needs to go through the sequence
USBMICInit and device discovery again.
In the event an application does perform the series of steps outlined above, the library will perform the equivalent sequence. After an application and associated RPLs release foreground, all underlying drivers and hardware are quiescent.
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.
|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.|
2013/05/08 Automated cleanup pass.
2012/08/03 Cleanup Pass
2012/07/09 Update for SDK2.06
2012/01/04 Initial version.