pub struct Protocol {
pub sync: Synchronization,
pub word_size: WordSize,
pub slot_size: SlotSize,
pub num_slots: u8,
}
Expand description
Serial audio protocol.
Fields§
§sync: Synchronization
Synchronization scheme.
word_size: WordSize
Number of bits filled with audio data.
The only values allowed are 8, 10, 16, 20, 24, and 32.
slot_size: SlotSize
Number of bits transmitted per word.
If a master clock is generated, the slot size should be a power of two if an integer ratio between the master clock and the bit clock is required.
If the value does not equal the word size, the only other values allowed are 16 and 32. In any case, the value has to be equal or larger than the word size. If the slot size does not match the word size, the data is padded according to the synchronization scheme.
num_slots: u8
Number of slots (i.e., audio channels) per frame.
For everything but PCM audio, the value needs to be 2 (stereo).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more