diff options
author | Jamieson Christian | 2003-06-11 05:54:46 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-06-11 05:54:46 +0000 |
commit | d2c952b3154523a718c49df9b5a01318c4dc709c (patch) | |
tree | 63347cbfd537020aa4b9f661161711c42fdd1fba /backends/midi | |
parent | 167ad2575a68ec09e6b855c8d3eb3cbc4cdcfeef (diff) | |
download | scummvm-rg350-d2c952b3154523a718c49df9b5a01318c4dc709c.tar.gz scummvm-rg350-d2c952b3154523a718c49df9b5a01318c4dc709c.tar.bz2 scummvm-rg350-d2c952b3154523a718c49df9b5a01318c4dc709c.zip |
Fixed race condition in MPU401 shutdown
svn-id: r8432
Diffstat (limited to 'backends/midi')
-rw-r--r-- | backends/midi/coreaudio.cpp | 2 | ||||
-rw-r--r-- | backends/midi/morphos.cpp | 1 | ||||
-rw-r--r-- | backends/midi/null.cpp | 1 | ||||
-rw-r--r-- | backends/midi/quicktime.cpp | 2 | ||||
-rw-r--r-- | backends/midi/seq.cpp | 1 | ||||
-rw-r--r-- | backends/midi/windows.cpp | 1 |
6 files changed, 7 insertions, 1 deletions
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 47561f4f96..65f0e0274f 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -90,6 +90,8 @@ int MidiDriver_CORE::open() { } void MidiDriver_CORE::close() { + MidiDriver_MPU401::close(); + // Stop the output AudioOutputUnitStop(au_output); diff --git a/backends/midi/morphos.cpp b/backends/midi/morphos.cpp index b4f5fd4eff..20dd409fca 100644 --- a/backends/midi/morphos.cpp +++ b/backends/midi/morphos.cpp @@ -68,6 +68,7 @@ int MidiDriver_ETUDE::open() void MidiDriver_ETUDE::close() { + MidiDriver_MPU401::close(); exit_morphos_music(); _isOpen = false; } diff --git a/backends/midi/null.cpp b/backends/midi/null.cpp index 062bcea31c..9366bc7f1c 100644 --- a/backends/midi/null.cpp +++ b/backends/midi/null.cpp @@ -26,7 +26,6 @@ class MidiDriver_NULL : public MidiDriver_MPU401 { public: int open(); - void close() { } void send(uint32 b) { } }; diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index e61e6409f2..928705ba71 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -115,6 +115,8 @@ bail: void MidiDriver_QT::close() { + MidiDriver_MPU401::close(); + for (int i = 0; i < 15; i++) { if (qtNoteChannel[i] != NULL) NADisposeNoteChannel(qtNoteAllocator, qtNoteChannel[i]); diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index fc7777ece2..2fab845887 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -87,6 +87,7 @@ int MidiDriver_SEQ::open() { } void MidiDriver_SEQ::close() { + MidiDriver_MPU401::close(); ::close(device); _isOpen = false; } diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index c4ebcfd9ce..319997d6c5 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -68,6 +68,7 @@ void MidiDriver_WIN::close() { if (!_isOpen) return; _isOpen = false; + MidiDriver_MPU401::close(); midiOutUnprepareHeader (_mo, &_streamHeader, sizeof (_streamHeader)); check_error(midiOutClose(_mo)); CloseHandle (_streamEvent); |