pub struct PcmSupportedFormats {
pub channel_sets: Option<Vec<ChannelSet>>,
pub sample_formats: Option<Vec<SampleFormat>>,
pub bytes_per_sample: Option<Vec<u8>>,
pub valid_bits_per_sample: Option<Vec<u8>>,
pub frame_rates: Option<Vec<u32>>,
/* private fields */
}
Expand description
Format supporting non-compressed PCM audio. Each frame consists of one or more
(number_of_channels) samples, stored contiguously. Within the bytes_per_sample
allocated for
each sample, valid_bits_per_sample
bits of data are stored in the most-significant
(left-justified) portion.
All values listed in each vector are supported. When not all combinations supported by
the driver can be described with one SupportedFormats
or PcmSupportedFormats
,
GetSupportedFormats
returns more than one SupportedFormats
in the returned vector.
For more detailed information see Audio Driver Streaming Interface.
Fields§
§channel_sets: Option<Vec<ChannelSet>>
Vector of possible ChannelSets
supported.
A ChannelSet
specifies a channel configuration (including a channel-count), plus a number
of optional attributes.
Only one ChannelSet
is allowed for each unique channel-count. As a result, no two entries
in channel_sets
can contain attributes
vectors with the same length.
Required.
sample_formats: Option<Vec<SampleFormat>>
Vector of possible SampleFormat
s supported.
Required.
bytes_per_sample: Option<Vec<u8>>
Vector of possible bytes allocated for each sample. Values must be listed in ascending
order. All values listed in valid_bits_per_sample
must fit into at least the largest
bytes_per_sample
value.
Required.
valid_bits_per_sample: Option<Vec<u8>>
Vector of possible number of bits containing valid data, within the sample container defined
by bytes_per_sample
. Values must be listed in ascending order. All values listed must fit
into the largest bytes_per_sample
value. The valid data bits must be most-significant
(left-justified) within the sample container, and any additional bits will be ignored.
Required.
frame_rates: Option<Vec<u32>>
Vector of possible frame rates supported. Values must be listed in ascending order.
Required.
Trait Implementations§
Source§impl Clone for PcmSupportedFormats
impl Clone for PcmSupportedFormats
Source§fn clone(&self) -> PcmSupportedFormats
fn clone(&self) -> PcmSupportedFormats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PcmSupportedFormats
impl Debug for PcmSupportedFormats
Source§impl<D: ResourceDialect> Decode<PcmSupportedFormats, D> for PcmSupportedFormats
impl<D: ResourceDialect> Decode<PcmSupportedFormats, D> for PcmSupportedFormats
Source§impl Default for PcmSupportedFormats
impl Default for PcmSupportedFormats
Source§fn default() -> PcmSupportedFormats
fn default() -> PcmSupportedFormats
Source§impl<D: ResourceDialect> Encode<PcmSupportedFormats, D> for &PcmSupportedFormats
impl<D: ResourceDialect> Encode<PcmSupportedFormats, D> for &PcmSupportedFormats
Source§impl PartialEq for PcmSupportedFormats
impl PartialEq for PcmSupportedFormats
Source§impl TypeMarker for PcmSupportedFormats
impl TypeMarker for PcmSupportedFormats
Source§type Owned = PcmSupportedFormats
type Owned = PcmSupportedFormats
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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 PcmSupportedFormats
impl ValueTypeMarker for PcmSupportedFormats
Source§type Borrowed<'a> = &'a PcmSupportedFormats
type Borrowed<'a> = &'a PcmSupportedFormats
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for PcmSupportedFormats
impl StructuralPartialEq for PcmSupportedFormats
Auto Trait Implementations§
impl Freeze for PcmSupportedFormats
impl RefUnwindSafe for PcmSupportedFormats
impl Send for PcmSupportedFormats
impl Sync for PcmSupportedFormats
impl Unpin for PcmSupportedFormats
impl UnwindSafe for PcmSupportedFormats
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
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)
clone_to_uninit
)