#include <cafe/uac.h>

int UACOUTSetDataConsumed(usb_mic_handle_t h_mic, unsigned int c_samples);


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 UACInit and will contain a valid instance handle when the UAC device is attached.
c_samples The number of PCM samples (16-bit signed integer) that the application has taken from the ring buffer. One sample consists of the interleaved set of PCM data for all channels.

Return Values

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


Calling this function will update the output ring buffer state in the UAC library. The count is in samples, not bytes. One sample is sizeof(short int) * <number-of-channels>. Since this function will only update the internal state in the library, it is of no concern whether the data in the output ring buffer is valid.

This function is designed to be callable from a timing sensitive thread such as an AX callback function.

The UAC output system is designed to operate at a nominal pull rate of either 32kHz or 48kHz, as selected during UACOUTStart.

This function serves for streaming output as UACINSetDataConsumed serves for streaming input.

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

Error Codes

Revision History

2013-05-29 Initial version.