Skip to main content

AudioStream

Struct AudioStream 

Source
pub struct AudioStream<B>{ /* private fields */ }
Expand description

Zero-cost static-dispatch core AudioStream<B> entity (0 vtable overhead, 0 steady-state heap allocations on read_into).

Implementations§

Source§

impl<B> AudioStream<B>

Source

pub fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<AudioStream<B>, CapabilityError>

Source

pub fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<AudioStream<B>, CapabilityError>

Source

pub fn open_with_permission_policy( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, permission_policy: PermissionPolicy, ) -> Result<AudioStream<B>, CapabilityError>

Source§

impl<B> AudioStream<B>

Source

pub fn new(inner: B) -> AudioStream<B>

Source

pub fn into_inner(self) -> B

Source

pub fn backend(&self) -> &B

Source

pub fn backend_mut(&mut self) -> &mut B

Source

pub fn format(&self) -> &Arc<Format> ⓘ

Source

pub fn trace(&self) -> Option<&Arc<Trace>>

Source

pub fn control_handle(&self) -> ControlHandle

Source

pub fn default_cancel(&self) -> Cancellation

Source

pub fn end_reason(&self) -> Option<EndReason>

Source

pub fn read( &mut self, frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>

Source

pub fn read_with_cancel( &mut self, frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>

Source

pub fn read_into( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>

Source

pub fn read_into_with_cancel( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>

Source

pub fn stop(&self, mode: Stop)

Source

pub fn resources_done(&self) -> bool

Source

pub fn wait_cleanup(&self, timeout: Duration) -> bool

Auto Trait Implementations§

§

impl<B> Freeze for AudioStream<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for AudioStream<B>
where B: RefUnwindSafe,

§

impl<B> Send for AudioStream<B>

§

impl<B> Sync for AudioStream<B>
where B: Sync,

§

impl<B> Unpin for AudioStream<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for AudioStream<B>
where B: UnsafeUnpin,

§

impl<B> UnwindSafe for AudioStream<B>
where B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.