Work on daw backend

This commit is contained in:
Skyler Lehmkuhl
2025-10-18 18:09:07 -04:00
parent 87d2036f07
commit 9414bdcd74
758 changed files with 5749 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
pub mod types;
pub use types::{AudioEvent, Command};
+38
View File
@@ -0,0 +1,38 @@
use crate::audio::{ClipId, TrackId};
/// Commands sent from UI/control thread to audio thread
#[derive(Debug, Clone)]
pub enum Command {
// Transport commands
/// Start playback
Play,
/// Stop playback and reset to beginning
Stop,
/// Pause playback (maintains position)
Pause,
/// Seek to a specific position in seconds
Seek(f64),
// Track management commands
/// Set track volume (0.0 = silence, 1.0 = unity gain)
SetTrackVolume(TrackId, f32),
/// Set track mute state
SetTrackMute(TrackId, bool),
/// Set track solo state
SetTrackSolo(TrackId, bool),
// Clip management commands
/// Move a clip to a new timeline position
MoveClip(TrackId, ClipId, f64),
}
/// Events sent from audio thread back to UI/control thread
#[derive(Debug, Clone)]
pub enum AudioEvent {
/// Current playback position in seconds
PlaybackPosition(f64),
/// Playback has stopped (reached end of audio)
PlaybackStopped,
/// Audio buffer underrun detected
BufferUnderrun,
}