pub struct AudioEngine {
pub stream: Stream,
}Expand description
Live output stream; dropping it stops audio and releases the device.
Fields§
§stream: StreamKept so the device keeps playing until the engine is dropped.
Implementations§
Source§impl AudioEngine
impl AudioEngine
Sourcepub fn new(
audio_bridge: AudioBridge,
graph: Graph,
output_node: u32,
scope_input_node: Option<u32>,
sample_rate: f64,
) -> Result<Self, Error>
pub fn new( audio_bridge: AudioBridge, graph: Graph, output_node: u32, scope_input_node: Option<u32>, sample_rate: f64, ) -> Result<Self, Error>
Opens the default F32 stereo output at sample_rate, wiring audio_bridge and graph into the callback.
scope_input_node: optional graph node id whose stereo output is copied into
crate::bridge::ScopeSnapshot::graph_in (e.g. instrument bus before master FX).
Auto Trait Implementations§
impl Freeze for AudioEngine
impl !RefUnwindSafe for AudioEngine
impl Send for AudioEngine
impl Sync for AudioEngine
impl Unpin for AudioEngine
impl UnsafeUnpin for AudioEngine
impl !UnwindSafe for AudioEngine
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