Fix music volume regression in HE games.

svn-id: r14215
This commit is contained in:
Travis Howell 2004-07-15 05:44:57 +00:00
parent fc0ee14938
commit 84e77997d3
2 changed files with 8 additions and 4 deletions

View file

@ -27,6 +27,7 @@
#include "scumm/actor.h" #include "scumm/actor.h"
#include "scumm/charset.h" #include "scumm/charset.h"
#include "scumm/imuse.h"
#include "scumm/intern.h" #include "scumm/intern.h"
#include "scumm/object.h" #include "scumm/object.h"
#include "scumm/resource.h" #include "scumm/resource.h"
@ -1108,16 +1109,19 @@ void ScummEngine_v6he::o6_writeFile() {
void ScummEngine_v6he::o6_soundOps() { void ScummEngine_v6he::o6_soundOps() {
byte subOp = fetchScriptByte(); byte subOp = fetchScriptByte();
int volume = pop(); int arg = pop();
switch (subOp) { switch (subOp) {
case 0xde: case 0xde:
_mixer->setMusicVolume(volume); if (_heversion == 60)
_imuse->set_music_volume(arg);
else
_mixer->setChannelVolume(_sound->_musicChannelHandle, arg);
break; break;
case 0xe0: case 0xe0:
// Fatty Bear's Birthday surprise uses this when playing the // Fatty Bear's Birthday surprise uses this when playing the
// piano, but only when using one of the digitized instruments. // piano, but only when using one of the digitized instruments.
// See also o6_startSound(). // See also o6_startSound().
_sound->setOverrideFreq(volume); _sound->setOverrideFreq(arg);
break; break;
} }
} }

View file

@ -801,7 +801,7 @@ void Sound::stopSound(int a) {
// Stop current music // Stop current music
if (_currentMusic) if (_currentMusic)
_vm->_mixer->stopID(_currentMusic); _vm->_mixer->stopID(_currentMusic);
else if (_vm->_imuse) else
_vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1)); _vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1));
} }
} }