#include <cafe/uac.h> int UACOUTStart(usb_mic_handle_t h_mic, usb_mic_ringbuffer_t* p_rb, unsigned int sample_rate);
|h_mic||Instance handle returned via
A pointer to a ring buffer of type
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 interleaved PCM data from the
ring buffer that was provided with this function call
This function will only succeed if the UAC stack has been successfully opened via
If, for some reason, the caller of this function cannot keep up with the rate of outflowing data, then a stream of zeros is sent to the UAC output interface.
To assure that a sufficient free space exists in the output ring buffer,
a caller must call
to query how many PCM samples can be placed into the ring buffer.
This function is affected by foreground/background switching.
Upon releasing foreground, an
application is required to call
UACUninit to fully shut down the UAC driver
stack. When foreground status is reacquired, an application needs to go through the sequence
UACInit and device discovery again.
In the event an application does not 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/29 Initial version.