Struct cpal::SupportedStreamConfigRange
source · [−]pub struct SupportedStreamConfigRange { /* private fields */ }
Expand description
Describes a range of supported stream configurations, retrieved via the
Device::supported_input/output_configs
method.
Implementations
Retrieve a SupportedStreamConfig
with the given sample rate and buffer size.
**panic!**s if the given sample_rate
is outside the range specified within this
SupportedStreamConfigRange
instance.
Turns this SupportedStreamConfigRange
into a SupportedStreamConfig
corresponding to the maximum samples rate.
A comparison function which compares two SupportedStreamConfigRange
s in terms of their priority of
use as a default stream format.
Some backends do not provide a default stream format for their audio devices. In these cases, CPAL attempts to decide on a reasonable default format for the user. To do this we use the “greatest” of all supported stream formats when compared with this method.
SupportedStreamConfigs are prioritised by the following heuristics:
Channels:
- Stereo
- Mono
- Max available channels
Sample format:
- f32
- i16
- u16
Sample rate:
- 44100 (cd quality)
- Max sample rate
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SupportedStreamConfigRange
impl Send for SupportedStreamConfigRange
impl Sync for SupportedStreamConfigRange
impl Unpin for SupportedStreamConfigRange
impl UnwindSafe for SupportedStreamConfigRange
Blanket Implementations
Mutably borrows from an owned value. Read more