pub struct EngineShared {
pub config: EngineConfig,
pub transport: Arc<Transport>,
pub panic_flag: Arc<AtomicBool>,
pub vu_levels: Arc<VuLevels>,
pub mixer_command_tx: Sender<MixerCommand>,
pub track_handles: Vec<Arc<TrackHandle>>,
}Expand description
The core audio engine. Lives on the audio thread.
The engine is split into two parts:
EngineShared: read from any thread (transport, config)EngineAudio: owned by the audio callback (synth, MIDI receiver)
Fields§
§config: EngineConfig§transport: Arc<Transport>§panic_flag: Arc<AtomicBool>§vu_levels: Arc<VuLevels>Real-time VU meter levels from the audio thread (master bus).
mixer_command_tx: Sender<MixerCommand>Send commands to the mixer (add/remove tracks, set instruments).
track_handles: Vec<Arc<TrackHandle>>Per-track handles for UI to read VU / write mute/solo/arm/volume.
Implementations§
pub fn new(config: EngineConfig) -> Self
Sourcepub fn with_command_tx(config: EngineConfig, tx: Sender<MixerCommand>) -> Self
pub fn with_command_tx(config: EngineConfig, tx: Sender<MixerCommand>) -> Self
Create shared state with a specific command sender (for wiring to a mixer).
Auto Trait Implementations§
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