pub struct StreamInfo {
pub sample_rate: NonZeroU32,
pub sample_rate_recip: f64,
pub prev_sample_rate: NonZeroU32,
pub max_block_frames: NonZeroU32,
pub num_stream_in_channels: u32,
pub num_stream_out_channels: u32,
pub input_to_output_latency_seconds: f64,
pub declick_frames: NonZeroU32,
pub output_device_id: String,
pub input_device_id: Option<String>,
}Expand description
Information about a running audio stream.
Fields§
§sample_rate: NonZeroU32The sample rate of the audio stream.
sample_rate_recip: f64The reciprocal of the sample rate.
This is provided for convenience since dividing by the sample rate is such a common operation.
Note to users implementing a custom AudioBackend: The context will overwrite
this value, so just set this to the default value.
prev_sample_rate: NonZeroU32The sample rate of the previous stream. (If this is the first stream, then this
will just be a copy of StreamInfo::sample_rate).
Note to users implementing a custom AudioBackend: The context will overwrite
this value, so just set this to the default value.
max_block_frames: NonZeroU32The maximum number of frames that can appear in a single process cyle.
num_stream_in_channels: u32The number of input audio channels in the stream.
num_stream_out_channels: u32The number of output audio channels in the stream.
input_to_output_latency_seconds: f64The latency of the input to output stream in seconds.
declick_frames: NonZeroU32The number of frames used in the shared declicker DSP.
Note to users implementing a custom AudioBackend: The context will overwrite
this value, so just set this to the default value.
output_device_id: StringThe identifier of the output audio device (converted to a string).
input_device_id: Option<String>The identifier of the input audio device (converted to a string).
Trait Implementations§
Source§impl Clone for StreamInfo
impl Clone for StreamInfo
Source§fn clone(&self) -> StreamInfo
fn clone(&self) -> StreamInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamInfo
impl Debug for StreamInfo
Source§impl Default for StreamInfo
impl Default for StreamInfo
Source§impl PartialEq for StreamInfo
impl PartialEq for StreamInfo
impl StructuralPartialEq for StreamInfo
Auto Trait Implementations§
impl Freeze for StreamInfo
impl RefUnwindSafe for StreamInfo
impl Send for StreamInfo
impl Sync for StreamInfo
impl Unpin for StreamInfo
impl UnwindSafe for StreamInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().