pub struct StreamSpec { /* private fields */ }Expand description
A declarative description of one stream on a device.
The framework turns a StreamSpec into an
kAudioStreamClassID audio object, answers the HAL’s property
queries about it (direction, starting channel, virtual format),
and routes the stream’s samples into
Driver::process_io. Build one with
StreamSpec::input / StreamSpec::output and the
builder-style setters.
Implementations§
Source§impl StreamSpec
impl StreamSpec
Sourcepub const fn input(format: StreamFormat) -> Self
pub const fn input(format: StreamFormat) -> Self
An input stream carrying format, starting at channel 1.
Sourcepub const fn output(format: StreamFormat) -> Self
pub const fn output(format: StreamFormat) -> Self
An output stream carrying format, starting at channel 1.
Sourcepub const fn with_starting_channel(self, channel: u32) -> Self
pub const fn with_starting_channel(self, channel: u32) -> Self
Builder-style: set the 1-based channel this stream’s first channel maps to within the owning device.
Sourcepub const fn with_format(self, format: StreamFormat) -> Self
pub const fn with_format(self, format: StreamFormat) -> Self
Builder-style: replace the stream format.
Sourcepub const fn direction(&self) -> StreamDirection
pub const fn direction(&self) -> StreamDirection
The direction this stream carries audio.
Sourcepub const fn starting_channel(&self) -> u32
pub const fn starting_channel(&self) -> u32
The 1-based starting channel
(kAudioStreamPropertyStartingChannel).
Sourcepub const fn format(&self) -> StreamFormat
pub const fn format(&self) -> StreamFormat
The stream’s StreamFormat
(kAudioStreamPropertyVirtualFormat).
Trait Implementations§
Source§impl Clone for StreamSpec
impl Clone for StreamSpec
Source§fn clone(&self) -> StreamSpec
fn clone(&self) -> StreamSpec
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 StreamSpec
impl Debug for StreamSpec
Source§impl PartialEq for StreamSpec
impl PartialEq for StreamSpec
Source§fn eq(&self, other: &StreamSpec) -> bool
fn eq(&self, other: &StreamSpec) -> bool
self and other values to be equal, and is used by ==.