aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-19 20:02:17 +0000
committerFilippos Karapetis2010-01-19 20:02:17 +0000
commitf0e6c3f14204aec1d34860b0595495dbfd505b48 (patch)
treed9240c1ab632a3a88d1970ce858761fc8a4f134a /engines
parentdbe665908e8536046593a6dfbb7087f53119f1dd (diff)
downloadscummvm-rg350-f0e6c3f14204aec1d34860b0595495dbfd505b48.tar.gz
scummvm-rg350-f0e6c3f14204aec1d34860b0595495dbfd505b48.tar.bz2
scummvm-rg350-f0e6c3f14204aec1d34860b0595495dbfd505b48.zip
- Removed the resetDriver() hack. The reason why notes stopped being played sometimes was actually mixer->stopAll(), which stopped the music stream as well (spotted by waltervn)
- Hooked setReverb() to actually set music reverb svn-id: r47392
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp2
-rw-r--r--engines/sci/sound/music.cpp19
-rw-r--r--engines/sci/sound/music.h2
-rw-r--r--engines/sci/sound/soundcmd.cpp8
-rw-r--r--engines/sci/sound/soundcmd.h1
5 files changed, 2 insertions, 30 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index ab186ba819..1b5998617a 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1885,8 +1885,6 @@ static EngineState *_game_run(EngineState *&s, int restoring) {
game_init(s);
#ifdef USE_OLD_MUSIC_FUNCTIONS
s->_sound.sfx_reset_player();
-#else
- s->_soundCmd->resetDriver();
#endif
_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play);
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 32b311cd63..65d3d2cd16 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -91,8 +91,6 @@ void SciMusic::init() {
}
void SciMusic::clearPlayList() {
- _pMixer->stopAll();
-
_mutex.lock();
while (!_playList.empty()) {
soundStop(_playList[0]);
@@ -134,23 +132,10 @@ MusicEntry *SciMusic::getSlot(reg_t obj) {
}
void SciMusic::setReverb(byte reverb) {
- _reverb = reverb;
-
- // TODO: actually set reverb for MT-32
-
- // A good test case for this are the first two rooms in Longbow:
- // reverb is set for the first room (the cave) and is subsequently
- // cleared when Robin exits the cave
-}
-
-void SciMusic::resetDriver() {
Common::StackLock lock(_mutex);
+ _reverb = reverb;
- // TODO/FIXME: is there any better way to reset the driver?
-
- _pMidiDrv->close();
- _pMidiDrv->open();
- _pMidiDrv->setTimerCallback(this, &miditimerCallback);
+ _pMidiDrv->setReverb(reverb);
}
static int f_compare(const void *arg1, const void *arg2) {
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index b6c4a21308..26cf3ac0ab 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -187,8 +187,6 @@ public:
void setReverb(byte reverb);
- void resetDriver();
-
#ifndef USE_OLD_MUSIC_FUNCTIONS
virtual void saveLoadWithSerializer(Common::Serializer &ser);
#endif
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 2268b6b76a..79e8670578 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -1065,8 +1065,6 @@ void SoundCommandParser::reconstructPlayList(int savegame_version) {
#ifndef USE_OLD_MUSIC_FUNCTIONS
Common::StackLock lock(_music->_mutex);
- _music->resetDriver();
-
const MusicList::iterator end = _music->getPlayListEnd();
for (MusicList::iterator i = _music->getPlayListStart(); i != end; ++i) {
if (savegame_version < 14) {
@@ -1096,12 +1094,6 @@ void SoundCommandParser::printPlayList(Console *con) {
#endif
}
-void SoundCommandParser::resetDriver() {
-#ifndef USE_OLD_MUSIC_FUNCTIONS
- _music->resetDriver();
-#endif
-}
-
void SoundCommandParser::setMasterVolume(int vol) {
#ifndef USE_OLD_MUSIC_FUNCTIONS
_music->soundSetMasterVolume(vol);
diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h
index 590aba6388..d7b0b87609 100644
--- a/engines/sci/sound/soundcmd.h
+++ b/engines/sci/sound/soundcmd.h
@@ -62,7 +62,6 @@ public:
void syncPlayList(Common::Serializer &s);
void reconstructPlayList(int savegame_version);
void printPlayList(Console *con);
- void resetDriver();
void setMasterVolume(int vol);
#ifndef USE_OLD_MUSIC_FUNCTIONS