This commit is contained in:
2026-02-03 13:52:36 +01:00
parent e337eb35e7
commit 9ff024cf9b
3 changed files with 3 additions and 49 deletions

View File

@@ -23,8 +23,6 @@ pub enum DispatchCommand {
Audio { cmd: String, time: Option<f64> },
Midi(MidiCommand),
FlushMidi,
Hush,
Panic,
}
impl Ord for TimedCommand {
@@ -152,12 +150,6 @@ fn dispatch_command(
}
}
}
DispatchCommand::Hush => {
let _ = audio_tx.load().try_send(AudioCommand::Hush);
}
DispatchCommand::Panic => {
let _ = audio_tx.load().try_send(AudioCommand::Panic);
}
}
}
@@ -170,15 +162,15 @@ mod tests {
let mut heap: BinaryHeap<TimedCommand> = BinaryHeap::new();
heap.push(TimedCommand {
command: DispatchCommand::Hush,
command: DispatchCommand::FlushMidi,
target_time_us: 300,
});
heap.push(TimedCommand {
command: DispatchCommand::Hush,
command: DispatchCommand::FlushMidi,
target_time_us: 100,
});
heap.push(TimedCommand {
command: DispatchCommand::Hush,
command: DispatchCommand::FlushMidi,
target_time_us: 200,
});