Skip to main content

AudioOutputStream

Trait AudioOutputStream 

Source
pub trait AudioOutputStream: AudioStream + AudioOutputStreamSafe {
    // Required methods
    fn pause_with_timeout(&mut self, timeout_nanoseconds: i64) -> Status;
    fn flush_with_timeout(&mut self, timeout_nanoseconds: i64) -> Status;
    fn request_pause(&mut self) -> Status;
    fn request_flush(&mut self) -> Status;

    // Provided methods
    fn pause(&mut self) -> Status { ... }
    fn flush(&mut self) -> Status { ... }
}
Expand description

The stream which has pause/flush capabilities

Required Methods§

Source

fn pause_with_timeout(&mut self, timeout_nanoseconds: i64) -> Status

Pause the stream. This will block until the stream has been paused, an error occurs or timeoutNanoseconds has been reached.

Source

fn flush_with_timeout(&mut self, timeout_nanoseconds: i64) -> Status

Flush the stream. This will block until the stream has been flushed, an error occurs or timeoutNanoseconds has been reached.

Source

fn request_pause(&mut self) -> Status

Pause the stream asynchronously. Returns immediately (does not block). Equivalent to calling pause(0).

Source

fn request_flush(&mut self) -> Status

Flush the stream asynchronously. Returns immediately (does not block). Equivalent to calling flush(0).

Provided Methods§

Source

fn pause(&mut self) -> Status

Pause the stream. This will block until the stream has been paused, an error occurs or timeoutNanoseconds has been reached.

Source

fn flush(&mut self) -> Status

Flush the stream. This will block until the stream has been flushed, an error occurs or timeoutNanoseconds has been reached.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: RawAudioOutputStream + RawAudioStream + RawAudioStreamBase> AudioOutputStream for T