aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth
diff options
context:
space:
mode:
Diffstat (limited to 'sound/softsynth')
-rw-r--r--sound/softsynth/adlib.cpp5
-rw-r--r--sound/softsynth/emumidi.h1
-rw-r--r--sound/softsynth/ym2612.cpp5
3 files changed, 5 insertions, 6 deletions
diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp
index 96b1add13f..15a99069be 100644
--- a/sound/softsynth/adlib.cpp
+++ b/sound/softsynth/adlib.cpp
@@ -847,7 +847,7 @@ int MidiDriver_ADLIB::open() {
adlib_write(0xBD, 0x00);
create_lookup_table();
- _mixer->setupPremix(this);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
return 0;
}
@@ -857,8 +857,7 @@ void MidiDriver_ADLIB::close() {
return;
_isOpen = false;
- // Detach the premix callback handler
- _mixer->setupPremix(0);
+ _mixer->stopHandle(_mixerSoundHandle);
uint i;
for (i = 0; i < ARRAYSIZE(_voices); ++i) {
diff --git a/sound/softsynth/emumidi.h b/sound/softsynth/emumidi.h
index 557e9b04cc..43161e51e4 100644
--- a/sound/softsynth/emumidi.h
+++ b/sound/softsynth/emumidi.h
@@ -30,6 +30,7 @@ class MidiDriver_Emulated : public Audio::AudioStream, public MidiDriver {
protected:
bool _isOpen;
Audio::Mixer *_mixer;
+ Audio::SoundHandle _mixerSoundHandle;
private:
Common::TimerManager::TimerProc _timerProc;
diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp
index 40962c04c5..823e371a88 100644
--- a/sound/softsynth/ym2612.cpp
+++ b/sound/softsynth/ym2612.cpp
@@ -741,7 +741,7 @@ int MidiDriver_YM2612::open() {
MidiDriver_Emulated::open();
- _mixer->setupPremix(this);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
return 0;
}
@@ -750,8 +750,7 @@ void MidiDriver_YM2612::close() {
return;
_isOpen = false;
- // Detach the premix callback handler
- _mixer->setupPremix(0);
+ _mixer->stopHandle(_mixerSoundHandle);
}
void MidiDriver_YM2612::send(uint32 b) {