Skip to content

Commit

Permalink
fix: don't use SoundFont without the file
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <noal.maximilien@gmail.com>
  • Loading branch information
maximilien-noal committed Jul 7, 2023
1 parent bb98cc0 commit 0d0c62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spice86.Core/Emulator/Sound/Midi/GeneralMidiDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void StartThreadIfNeeded() {
}

private void RenderThreadMethod() {
if (_audioPlayer is null) {
if (_audioPlayer is null || !File.Exists(SoundFont)) {
return;
}
// General MIDI needs a large buffer to store preset PCM data of musical instruments.
Expand Down

0 comments on commit 0d0c62f

Please sign in to comment.