pub struct AsioDriver { /* private fields */ }Expand description
SIM-visible ASIO driver metadata.
Implementations§
Source§impl AsioDriver
impl AsioDriver
Sourcepub fn new(
name: impl Into<String>,
timing: AsioTiming,
audio_inputs: usize,
audio_outputs: usize,
) -> Result<Self>
pub fn new( name: impl Into<String>, timing: AsioTiming, audio_inputs: usize, audio_outputs: usize, ) -> Result<Self>
Builds a driver with the given name, timing, and audio channel
counts, deriving the stable id asio/<name>/driver.
Returns an error if name is empty or the driver exposes no audio
channels at all.
Sourcepub fn sim_default() -> Result<Self>
pub fn sim_default() -> Result<Self>
Returns the bundled SIM-ASIO driver: stereo in/out with
AsioTiming::pro_audio_default timing.
Sourcepub fn timing(&self) -> AsioTiming
pub fn timing(&self) -> AsioTiming
Returns the driver’s buffer timing.
Sourcepub fn audio_inputs(&self) -> usize
pub fn audio_inputs(&self) -> usize
Returns the number of audio input channels the driver exposes.
Sourcepub fn audio_outputs(&self) -> usize
pub fn audio_outputs(&self) -> usize
Returns the number of audio output channels the driver exposes.
Sourcepub fn direction(&self) -> HostDirection
pub fn direction(&self) -> HostDirection
Returns the audio direction implied by the input/output channel counts,
treating a channelless driver as HostDirection::Duplex.
Sourcepub fn is_compatible_with(&self, requested: HostDirection) -> bool
pub fn is_compatible_with(&self, requested: HostDirection) -> bool
Reports whether the driver can serve the requested direction, which
holds for an exact match or for any request when the driver is duplex.
Sourcepub fn output_spec(&self) -> Result<PcmSpec>
pub fn output_spec(&self) -> Result<PcmSpec>
Returns an f32 PCM spec for the driver’s output channels (at least one) at the driver sample rate.
Trait Implementations§
Source§impl Clone for AsioDriver
impl Clone for AsioDriver
Source§fn clone(&self) -> AsioDriver
fn clone(&self) -> AsioDriver
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 AsioDriver
impl Debug for AsioDriver
impl Eq for AsioDriver
Source§impl PartialEq for AsioDriver
impl PartialEq for AsioDriver
Source§fn eq(&self, other: &AsioDriver) -> bool
fn eq(&self, other: &AsioDriver) -> bool
self and other values to be equal, and is used by ==.