|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
Collaboration diagram for UAC - USB Audio Class 1.0:Files | |
| file | uac.h |
| USB Audio Class 1.0 (UAC1) device class: speaker + microphone, app API. | |
Data Structures | |
| struct | uac_opts |
| UAC1 configuration: microphone source + speaker sink callbacks. More... | |
Typedefs | |
| typedef struct uac_audio | uac_audio |
| One USB Audio function: a single instance of the class on a device. | |
Functions | |
| uac_audio * | uac_add (usbip_device *dev, const uac_opts *opts) |
| Add a UAC1 audio interface (speaker + microphone) to a device. | |
| void | uac_tone (uint8_t *buf, int frames, uint32_t index) |
| Fill a buffer with the built-in synthetic microphone tone. | |
Variables | |
| const usbip_device_class | usbip_device_uac |
| The UAC1 audio class, for usbip_device_add_class() | |
One USB Audio function: a single instance of the class on a device.
Opaque - create one with uac_add() and use the functions below. Distinct from the other classes' handles, so mixing them up is a compile error rather than a misread state block.
| uac_audio * uac_add | ( | usbip_device * | dev, |
| const uac_opts * | opts | ||
| ) |
Add a UAC1 audio interface (speaker + microphone) to a device.
Leaves the device class triple at 0/0/0 (UAC1 predates the IAD; the AudioControl header collects the streaming interfaces).
| dev | the device. |
| opts | microphone source + speaker sink callbacks (see uac_opts). |
NULL on error. | void uac_tone | ( | uint8_t * | buf, |
| int | frames, | ||
| uint32_t | index | ||
| ) |
Fill a buffer with the built-in synthetic microphone tone.
Writes frames mono 16-bit-LE samples of a 440 Hz sine (48 kHz) starting at sample index. Pure integer, so it is byte-identical to the Python uac.tone() - exposed for cross-language parity tests.
| buf | output buffer (>= frames * 2 bytes). |
| frames | number of mono samples to write. |
| index | running sample counter (the phase origin). |
|
extern |
The UAC1 audio class, for usbip_device_add_class()