Skip to main content

HostOpenStream

Struct HostOpenStream 

Source
pub struct HostOpenStream { /* private fields */ }
Expand description

Open stream plus host-side callback queue.

Implementations§

Source§

impl HostOpenStream

Source

pub fn new(config: HostStreamConfig) -> Self

Creates an opened host stream backed by a push stream value.

Source

pub fn new_with_driver( config: HostStreamConfig, driver: Rc<dyn HostStreamDriver>, ) -> Self

Creates an opened host stream with an attached external driver.

Source

pub fn try_new_with_driver( config: HostStreamConfig, build_driver: impl FnOnce(HostCallbackQueue) -> Result<Rc<dyn HostStreamDriver>>, ) -> Result<Self>

Creates an opened host stream by building its driver from the callback queue that will be stored on the stream.

Source

pub fn new_realtime_local_audio(config: HostStreamConfig) -> Result<Self>

Creates a realtime local audio stream after validating callback limits.

Source

pub fn new_realtime_local_audio_with_driver( config: HostStreamConfig, driver: Rc<dyn HostStreamDriver>, ) -> Result<Self>

Creates a realtime local audio stream with an attached external driver.

Source

pub fn try_new_realtime_local_audio_with_driver( config: HostStreamConfig, build_driver: impl FnOnce(HostCallbackQueue) -> Result<Rc<dyn HostStreamDriver>>, ) -> Result<Self>

Creates a realtime local audio stream by building its driver from the stored callback queue.

Source

pub fn new_lan_midi_control(config: HostStreamConfig) -> Result<Self>

Creates a LAN MIDI/control stream after validating media and clock shape.

Source

pub fn new_lan_buffered_audio_preview(config: HostStreamConfig) -> Result<Self>

Creates a LAN buffered audio preview stream after validating media shape.

Source

pub fn config(&self) -> &HostStreamConfig

Returns the accepted stream configuration.

Source

pub fn queue(&self) -> &HostCallbackQueue

Returns the callback queue used by host callbacks or deterministic fakes.

Source

pub fn stream(&self) -> Arc<StreamValue>

Returns the stream value consumed by graph/runtime code.

Source

pub fn close(&self) -> Result<()>

Closes the host callback queue.

Source

pub fn cancel(&self) -> Result<()>

Cancels the callback queue and drops buffered packets.

Trait Implementations§

Source§

impl Clone for HostOpenStream

Source§

fn clone(&self) -> HostOpenStream

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.