Struct audio_streams::NoopStreamSource
source · pub struct NoopStreamSource;Expand description
Source of NoopStream and NoopStreamControl objects.
Implementations§
Trait Implementations§
source§impl Default for NoopStreamSource
impl Default for NoopStreamSource
source§fn default() -> NoopStreamSource
fn default() -> NoopStreamSource
Returns the “default value” for a type. Read more
source§impl StreamSource for NoopStreamSource
impl StreamSource for NoopStreamSource
source§fn new_playback_stream(
&mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
) -> Result<(Box<dyn StreamControl>, Box<dyn PlaybackBufferStream>), BoxError>
fn new_playback_stream( &mut self, num_channels: usize, format: SampleFormat, frame_rate: u32, buffer_size: usize, ) -> Result<(Box<dyn StreamControl>, Box<dyn PlaybackBufferStream>), BoxError>
Returns a stream control and buffer generator object. These are separate as the buffer
generator might want to be passed to the audio stream.
source§fn new_async_playback_stream(
&mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
_ex: &dyn AudioStreamsExecutor,
) -> Result<(Box<dyn StreamControl>, Box<dyn AsyncPlaybackBufferStream>), BoxError>
fn new_async_playback_stream( &mut self, num_channels: usize, format: SampleFormat, frame_rate: u32, buffer_size: usize, _ex: &dyn AudioStreamsExecutor, ) -> Result<(Box<dyn StreamControl>, Box<dyn AsyncPlaybackBufferStream>), BoxError>
Returns a stream control and async buffer generator object. These are separate as the buffer
generator might want to be passed to the audio stream.
source§fn async_new_async_playback_stream<'life0, 'life1, 'async_trait>(
&'life0 mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
ex: &'life1 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn StreamControl>, Box<dyn AsyncPlaybackBufferStream>), BoxError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_new_async_playback_stream<'life0, 'life1, 'async_trait>(
&'life0 mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
ex: &'life1 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn StreamControl>, Box<dyn AsyncPlaybackBufferStream>), BoxError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a stream control and async buffer generator object asynchronously.
Default implementation calls and blocks on
new_async_playback_stream().source§fn new_capture_stream(
&mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
_effects: &[StreamEffect],
) -> Result<(Box<dyn StreamControl>, Box<dyn CaptureBufferStream>), BoxError>
fn new_capture_stream( &mut self, num_channels: usize, format: SampleFormat, frame_rate: u32, buffer_size: usize, _effects: &[StreamEffect], ) -> Result<(Box<dyn StreamControl>, Box<dyn CaptureBufferStream>), BoxError>
Returns a stream control and buffer generator object. These are separate as the buffer
generator might want to be passed to the audio stream.
Default implementation returns
NoopStreamControl and NoopCaptureStream.source§fn new_async_capture_stream(
&mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
_effects: &[StreamEffect],
_ex: &dyn AudioStreamsExecutor,
) -> Result<(Box<dyn StreamControl>, Box<dyn AsyncCaptureBufferStream>), BoxError>
fn new_async_capture_stream( &mut self, num_channels: usize, format: SampleFormat, frame_rate: u32, buffer_size: usize, _effects: &[StreamEffect], _ex: &dyn AudioStreamsExecutor, ) -> Result<(Box<dyn StreamControl>, Box<dyn AsyncCaptureBufferStream>), BoxError>
Returns a stream control and async buffer generator object. These are separate as the buffer
generator might want to be passed to the audio stream.
Default implementation returns
NoopStreamControl and NoopCaptureStream.source§fn async_new_async_capture_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
effects: &'life1 [StreamEffect],
ex: &'life2 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn StreamControl>, Box<dyn AsyncCaptureBufferStream>), BoxError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn async_new_async_capture_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
num_channels: usize,
format: SampleFormat,
frame_rate: u32,
buffer_size: usize,
effects: &'life1 [StreamEffect],
ex: &'life2 dyn AudioStreamsExecutor,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn StreamControl>, Box<dyn AsyncCaptureBufferStream>), BoxError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns a stream control and async buffer generator object asynchronously.
Default implementation calls and blocks on
new_async_capture_stream().Auto Trait Implementations§
impl Freeze for NoopStreamSource
impl RefUnwindSafe for NoopStreamSource
impl Send for NoopStreamSource
impl Sync for NoopStreamSource
impl Unpin for NoopStreamSource
impl UnwindSafe for NoopStreamSource
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
Mutably borrows from an owned value. Read more