|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
UAC1 configuration: microphone source + speaker sink callbacks. More...
#include <classes/uac.h>
Data Fields | |
| int(* | mic_source )(void *user, uint8_t *buf, int frames, uint32_t index) |
| Microphone source (optional). | |
| void(* | spk_sink )(void *user, const uint8_t *data, int len) |
| Speaker sink (optional). | |
| void(* | on_event )(void *user, const char *text) |
| Human-readable log hook (optional). | |
| void * | user |
| Opaque pointer passed to the callbacks above. | |
UAC1 configuration: microphone source + speaker sink callbacks.
| int(* uac_opts::mic_source) (void *user, uint8_t *buf, int frames, uint32_t index) |
Microphone source (optional).
Fill buf with mono 16-bit-LE capture samples; return < 0 to use the built-in 440 Hz synthetic tone.
| user | the user pointer. |
| buf | output buffer (frames × 2 bytes). |
| frames | number of mono samples requested. |
| index | running mono-sample counter (the phase origin). |
| void(* uac_opts::spk_sink) (void *user, const uint8_t *data, int len) |
Speaker sink (optional).
Receives stereo 16-bit-LE playback audio the host pushed to the speaker (once per isochronous OUT transfer).
| user | the user pointer. |
| data | the PCM bytes. |
| len | number of bytes in data. |
| void(* uac_opts::on_event) (void *user, const char *text) |
Human-readable log hook (optional).
| user | the user pointer. |
| text | a NUL-terminated description. |
| void* uac_opts::user |
Opaque pointer passed to the callbacks above.