pub struct CpalOutputConfig {
pub host: Option<HostId>,
pub device_id: Option<DeviceId>,
pub desired_sample_rate: Option<u32>,
pub desired_block_frames: Option<u32>,
pub fallback: bool,
}Expand description
The configuration of an output audio stream in the CPAL backend.
Fields§
§host: Option<HostId>The host to use. Set to None to use the
system’s default audio host.
device_id: Option<DeviceId>The id of the output device to use. Set to None to use the
system’s default output device.
By default this is set to None.
desired_sample_rate: Option<u32>The desired sample rate to use. Set to None to use the device’s
default sample rate.
By default this is set to None.
desired_block_frames: Option<u32>The latency/block size of the audio stream to use. Set to
None to use the device’s default value.
Smaller values may give better latency, but is not supported on all platforms and may lead to performance issues.
This currently has no effect on iOS platforms.
By default this is set to Some(1024).
fallback: boolWhether or not to fall back to the default device if a device with the given configuration could not be found.
By default this is set to true.
Trait Implementations§
Source§impl Clone for CpalOutputConfig
impl Clone for CpalOutputConfig
Source§fn clone(&self) -> CpalOutputConfig
fn clone(&self) -> CpalOutputConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CpalOutputConfig
impl Debug for CpalOutputConfig
Source§impl Default for CpalOutputConfig
impl Default for CpalOutputConfig
Source§impl PartialEq for CpalOutputConfig
impl PartialEq for CpalOutputConfig
Source§fn eq(&self, other: &CpalOutputConfig) -> bool
fn eq(&self, other: &CpalOutputConfig) -> bool
self and other values to be equal, and is used by ==.