Channel counts and sample rates¶
lib_xua is fully configurable in relation to channel counts and sample rates.
Practical limitations of these are normally based on USB packet size restrictions and I/O
availablity.
For example, the maximum packet size for high-speed USB is 1024 bytes, limiting the channel count to 10 channels for a device running at 192kHz with 32bit sample depth.
The defines in Table 8 set the channel counts exposed to the USB host.
Define |
Description |
Default |
|---|---|---|
|
Number of output channels the device advertises to the USB host |
N/A (must be defined) |
|
Number of input channels the device advertises to the USB host |
N/A (must be defined) |
Sample rates ranges are set by the defines in Table 9. The codebase will automatically populate the device sample rate list with popular frequencies between the min and max values. All values are in Hz:
Define |
Description |
Default |
|---|---|---|
|
Maximum supported sample rate (Hz) |
|
|
Minimum supported sample rate (Hz) |
|
|
Starting frequency for the device after boot |
|
The codebase requires knowledge of the two master clock frequencies that will be present on the master-clock port(s). One for 44.1kHz, 88.2kHz etc and one for 48kHz, 96kHz etc. These are set using defines in Table 10. All values are in Hz.
Define |
Description |
Default |
|---|---|---|
|
Master clock defines for 44100 rates (Hz) |
|
|
Master clock defines for 48000 rates (Hz) |
|