pub struct DaiFormat {
pub number_of_channels: u32,
pub channels_to_use_bitmask: u64,
pub sample_format: DaiSampleFormat,
pub frame_format: DaiFrameFormat,
pub frame_rate: u32,
pub bits_per_slot: u8,
pub bits_per_sample: u8,
}Expand description
DAI format. Frames are made up of number_of_channels samples which have bits_per_sample bits
of data within bits_per_slot arranged in frame_format. For more detailed information see
Digital Audio Interface.
Fields§
§number_of_channels: u32Number of channels.
Must be 2, if frame_format is DaiFrameFormatStandard::I2S, STEREO_LEFT or STEREO_RIGHT.
channels_to_use_bitmask: u64Sets which channels are active via a bitmask.
The least significant bit corresponds to channel index 0.
Must not set bits beyond the least-significant number_of_channels bits.
sample_format: DaiSampleFormatThe sample format of all samples.
frame_format: DaiFrameFormatThe frame format of all samples.
frame_rate: u32The frame rate for all samples.
bits_per_slot: u8The bits per slot for all channels.
bits_per_sample: u8The bits per sample for each channel.
Must be smaller than bits_per_slot for all samples to fit.
Trait Implementations§
Source§impl<D> Decode<DaiFormat, D> for DaiFormatwhere
D: ResourceDialect,
impl<D> Decode<DaiFormat, D> for DaiFormatwhere
D: ResourceDialect,
Source§impl Ord for DaiFormat
impl Ord for DaiFormat
Source§impl PartialOrd for DaiFormat
impl PartialOrd for DaiFormat
Source§impl TypeMarker for DaiFormat
impl TypeMarker for DaiFormat
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for DaiFormat
impl ValueTypeMarker for DaiFormat
Source§type Borrowed<'a> = &'a DaiFormat
type Borrowed<'a> = &'a DaiFormat
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<DaiFormat as TypeMarker>::Owned,
) -> <DaiFormat as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<DaiFormat as TypeMarker>::Owned, ) -> <DaiFormat as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.impl Copy for DaiFormat
impl Eq for DaiFormat
impl Persistable for DaiFormat
impl StructuralPartialEq for DaiFormat
Auto Trait Implementations§
impl Freeze for DaiFormat
impl RefUnwindSafe for DaiFormat
impl Send for DaiFormat
impl Sync for DaiFormat
impl Unpin for DaiFormat
impl UnwindSafe for DaiFormat
Blanket Implementations§
Source§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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