Wip
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user