pub struct CpalInputConfig {
pub host: Option<HostId>,
pub device_id: Option<DeviceId>,
pub desired_block_frames: Option<u32>,
pub channel_config: ResamplingChannelConfig,
pub fallback: bool,
pub fail_on_no_input: bool,
}Expand description
The configuration of an input 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 input device to use. Set to None to use the
system’s default input device.
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).
channel_config: ResamplingChannelConfigThe configuration of the input to output stream channel.
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.
fail_on_no_input: boolIf true, then an error will be returned if an input stream could
not be started. If false, then the output stream will still
attempt to start with no input stream.
By default this is set to false.
Trait Implementations§
Source§impl Clone for CpalInputConfig
impl Clone for CpalInputConfig
Source§fn clone(&self) -> CpalInputConfig
fn clone(&self) -> CpalInputConfig
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 CpalInputConfig
impl Debug for CpalInputConfig
Source§impl Default for CpalInputConfig
impl Default for CpalInputConfig
Source§impl PartialEq for CpalInputConfig
impl PartialEq for CpalInputConfig
Source§fn eq(&self, other: &CpalInputConfig) -> bool
fn eq(&self, other: &CpalInputConfig) -> bool
self and other values to be equal, and is used by ==.