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: u32
Number of channels.
channels_to_use_bitmask: u64
Sets which channels are active via a bitmask. The least significant bit corresponds to channel index 0.
sample_format: DaiSampleFormat
The sample format of all samples.
frame_format: DaiFrameFormat
The frame format of all samples.
frame_rate: u32
The frame rate for all samples.
bits_per_slot: u8
The bits per slot for all channels.
bits_per_sample: u8
The bits per sample for all samples. Must be smaller than bits per channel for samples to fit.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<DaiFormat, D> for DaiFormat
impl<D: ResourceDialect> Decode<DaiFormat, D> for DaiFormat
Source§impl<D: ResourceDialect, T0: Encode<u32, D>, T1: Encode<u64, D>, T2: Encode<DaiSampleFormat, D>, T3: Encode<DaiFrameFormat, D>, T4: Encode<u32, D>, T5: Encode<u8, D>, T6: Encode<u8, D>> Encode<DaiFormat, D> for (T0, T1, T2, T3, T4, T5, T6)
impl<D: ResourceDialect, T0: Encode<u32, D>, T1: Encode<u64, D>, T2: Encode<DaiSampleFormat, D>, T3: Encode<DaiFrameFormat, D>, T4: Encode<u32, D>, T5: Encode<u8, D>, T6: Encode<u8, D>> Encode<DaiFormat, D> for (T0, T1, T2, T3, T4, T5, T6)
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
.§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 more§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
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§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)