Struct cpal::SupportedStreamConfig
source · pub struct SupportedStreamConfig { /* private fields */ }
Expand description
Describes a single supported stream configuration, retrieved via either a
SupportedStreamConfigRange
instance or one of the
Device::default_input/output_config
methods.
Implementations§
source§impl SupportedStreamConfig
impl SupportedStreamConfig
pub fn new( channels: ChannelCount, sample_rate: SampleRate, buffer_size: SupportedBufferSize, sample_format: SampleFormat ) -> Self
pub fn channels(&self) -> ChannelCount
pub fn sample_rate(&self) -> SampleRate
pub fn buffer_size(&self) -> &SupportedBufferSize
pub fn sample_format(&self) -> SampleFormat
pub fn config(&self) -> StreamConfig
Trait Implementations§
source§impl Clone for SupportedStreamConfig
impl Clone for SupportedStreamConfig
source§fn clone(&self) -> SupportedStreamConfig
fn clone(&self) -> SupportedStreamConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SupportedStreamConfig
impl Debug for SupportedStreamConfig
source§impl From<SupportedStreamConfig> for StreamConfig
impl From<SupportedStreamConfig> for StreamConfig
source§fn from(conf: SupportedStreamConfig) -> Self
fn from(conf: SupportedStreamConfig) -> Self
Converts to this type from the input type.
source§impl PartialEq<SupportedStreamConfig> for SupportedStreamConfig
impl PartialEq<SupportedStreamConfig> for SupportedStreamConfig
source§fn eq(&self, other: &SupportedStreamConfig) -> bool
fn eq(&self, other: &SupportedStreamConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.