diff options
author | Max Horn | 2007-02-20 18:50:17 +0000 |
---|---|---|
committer | Max Horn | 2007-02-20 18:50:17 +0000 |
commit | 227a080e5b25762dc7a5a942dcfbfdbfcd76c372 (patch) | |
tree | c524092b2e9bb023bbaced29e8a245cf2cf6dff5 /engines/sword1 | |
parent | 547858993725af19d2167857c4e7a4a8ba8da185 (diff) | |
download | scummvm-rg350-227a080e5b25762dc7a5a942dcfbfdbfcd76c372.tar.gz scummvm-rg350-227a080e5b25762dc7a5a942dcfbfdbfcd76c372.tar.bz2 scummvm-rg350-227a080e5b25762dc7a5a942dcfbfdbfcd76c372.zip |
Patch #1663933 (Kill premix channel) with a few tiny additional tweaks by me
svn-id: r25752
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/music.cpp | 4 | ||||
-rw-r--r-- | engines/sword1/music.h | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp index fe3b90c052..41d47dc5d9 100644 --- a/engines/sword1/music.cpp +++ b/engines/sword1/music.cpp @@ -255,11 +255,11 @@ Music::Music(Audio::Mixer *pMixer) { _converter[0] = NULL; _converter[1] = NULL; _volumeL = _volumeR = 192; - _mixer->setupPremix(this); + _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true); } Music::~Music() { - _mixer->setupPremix(0); + _mixer->stopHandle(_soundHandle); delete _converter[0]; delete _converter[1]; } diff --git a/engines/sword1/music.h b/engines/sword1/music.h index 606c3d3004..75bb2521c1 100644 --- a/engines/sword1/music.h +++ b/engines/sword1/music.h @@ -27,12 +27,9 @@ #include "common/mutex.h" #include "common/file.h" #include "sound/audiostream.h" +#include "sound/mixer.h" #include "sound/rate.h" -namespace Audio { - class Mixer; -} - namespace Sword1 { #define TOTAL_TUNES 270 @@ -108,6 +105,7 @@ private: MusicHandle _handles[2]; Audio::RateConverter *_converter[2]; Audio::Mixer *_mixer; + Audio::SoundHandle _soundHandle; uint32 _sampleRate; Common::Mutex _mutex; |