pub struct AudioRenderThread {
    pub graph: AudioGraph,
    pub sink: Sink,
    pub sink_factory: Box<dyn Fn() -> Result<Box<dyn AudioSink + 'static>, AudioSinkError>>,
    pub reader_factory: Box<dyn Fn(MediaStreamId, f32) -> Box<dyn AudioStreamReader + Send>>,
    pub state: ProcessingState,
    pub sample_rate: f32,
    pub current_time: f64,
    pub current_frame: Tick,
    pub muted: bool,
}Fields§
§graph: AudioGraph§sink: Sink§sink_factory: Box<dyn Fn() -> Result<Box<dyn AudioSink + 'static>, AudioSinkError>>§reader_factory: Box<dyn Fn(MediaStreamId, f32) -> Box<dyn AudioStreamReader + Send>>§state: ProcessingState§sample_rate: f32§current_time: f64§current_frame: Tick§muted: boolImplementations§
Source§impl AudioRenderThread
 
impl AudioRenderThread
Sourcefn prepare_thread<B: AudioBackend>(
    sender: Sender<AudioRenderThreadMsg>,
    sample_rate: f32,
    graph: AudioGraph,
    options: AudioContextOptions,
) -> Result<Self, AudioSinkError>
 
fn prepare_thread<B: AudioBackend>( sender: Sender<AudioRenderThreadMsg>, sample_rate: f32, graph: AudioGraph, options: AudioContextOptions, ) -> Result<Self, AudioSinkError>
Initializes the AudioRenderThread object
You must call .event_loop() on this to run it!
Sourcepub fn start<B: AudioBackend>(
    event_queue: Receiver<AudioRenderThreadMsg>,
    sender: Sender<AudioRenderThreadMsg>,
    sample_rate: f32,
    graph: AudioGraph,
    options: AudioContextOptions,
    init_sender: Sender<Result<(), AudioSinkError>>,
)
 
pub fn start<B: AudioBackend>( event_queue: Receiver<AudioRenderThreadMsg>, sender: Sender<AudioRenderThreadMsg>, sample_rate: f32, graph: AudioGraph, options: AudioContextOptions, init_sender: Sender<Result<(), AudioSinkError>>, )
Start the audio render thread
In case something fails, it will instead start a thread with a dummy backend
fn resume(&mut self) -> StateChangeResult
fn suspend(&mut self) -> StateChangeResult
fn create_node(&mut self, node_type: AudioNodeInit, ch: ChannelInfo) -> NodeId
fn connect_ports( &mut self, output: PortId<OutputPort>, input: PortId<InputPort>, )
fn process(&mut self) -> Chunk
fn set_mute(&mut self, val: bool)
fn event_loop(&mut self, event_queue: Receiver<AudioRenderThreadMsg>)
Auto Trait Implementations§
impl !Freeze for AudioRenderThread
impl !RefUnwindSafe for AudioRenderThread
impl !Send for AudioRenderThread
impl !Sync for AudioRenderThread
impl Unpin for AudioRenderThread
impl !UnwindSafe for AudioRenderThread
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