From 227a080e5b25762dc7a5a942dcfbfdbfcd76c372 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 20 Feb 2007 18:50:17 +0000 Subject: Patch #1663933 (Kill premix channel) with a few tiny additional tweaks by me svn-id: r25752 --- engines/sword1/music.cpp | 4 ++-- engines/sword1/music.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/sword1') 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; -- cgit v1.2.3