Skip to content

Commit

Permalink
Enable Midi playback again
Browse files Browse the repository at this point in the history
  • Loading branch information
1whatleytay committed Nov 1, 2024
1 parent f3c9fe3 commit 65652c5
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src-backend/src/syscall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,22 +586,19 @@ impl SyscallDelegate {
return Completed;
}

// let state_clone = self.state.clone();

Failure("MIDI Playback is disabled on this version. This is a bug. Please file a bug at https://github.com/1whatleytay/saturn.".into())
// tokio::spawn(async move {
// let install = {
// let mut lock = state_clone.lock().unwrap();
//
// lock.midi.install(request.instrument)
// };
//
// if install.await {
// state_clone.lock().unwrap().midi.play(&request, false)
// }
// });

// Completed
let state_clone = self.state.clone();

let install = {
let mut lock = state_clone.lock().unwrap();

lock.midi.install(request.instrument)
};

if install.await {
state_clone.lock().unwrap().midi.play(&request, false)
}

Completed
}

async fn sleep_for_duration(&self, time: u64) {
Expand Down

0 comments on commit 65652c5

Please sign in to comment.