#include <cafe/usb_mic.h> int USBMICOpen(usb_mic_handle_t h_mic, mem_res_t* p_mem_res, usb_mic_ringbuffer_t* prb);
|h_mic||Instance handle returned via
A pointer to a structure of type
A pointer to a ringbuffer structure of type
A value of zero indicates success and any other value the type of error that was encountered.
Calling this function will prepare the USB UAC stack and put it into a state of readiness. This
function will only succeed if sufficient memory resources and ring buffer are provided. All
resources referenced in calling
USBMICOpen must remain allocated and accessible to the USB UAC
is called. Only the memory referenced in the ring buffer is shared between the USB UAC stack and
the hierarchically higher level process. All other memory resources are for the exclusive use
of the USB UAC stack.
The streaming of PCM data does not start until
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.
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/06 Update for SDK2.06
2012/01/04 Initial version.