diff options
author | Robert Göffringmann | 2003-08-20 12:12:11 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-08-20 12:12:11 +0000 |
commit | af17c1ac5161b261c4c8c41e360dd5d11b7859d7 (patch) | |
tree | 4c5b3a0dcda7056175951a0a747f303b3318e721 /sky/sound.cpp | |
parent | 123af301474cac28e53f96b5f23f229429d32eaa (diff) | |
download | scummvm-rg350-af17c1ac5161b261c4c8c41e360dd5d11b7859d7.tar.gz scummvm-rg350-af17c1ac5161b261c4c8c41e360dd5d11b7859d7.tar.bz2 scummvm-rg350-af17c1ac5161b261c4c8c41e360dd5d11b7859d7.zip |
copied some fixes which only were in 0.5.1 branch.
svn-id: r9799
Diffstat (limited to 'sky/sound.cpp')
-rw-r--r-- | sky/sound.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sky/sound.cpp b/sky/sound.cpp index acad413f9a..0488557506 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1012,7 +1012,7 @@ SfxQueue SkySound::_sfxQueue[MAX_QUEUED_FX] = { { 0, 0, 0, 0} }; -SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk) { +SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk, uint8 pVolume) { _skyDisk = pDisk; _soundData = NULL; _mixer = mixer; @@ -1022,6 +1022,7 @@ SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk) { _ingameSpeech = 0; _ingameSound0 = _ingameSound1 = 0; _saveSounds[0] = _saveSounds[1] = 0xFFFF; + _mainSfxVolume = pVolume; } SkySound::~SkySound(void) { @@ -1159,7 +1160,7 @@ void SkySound::fnStartFx(uint32 sound, uint8 channel) { // get fx volume - uint8 volume = 0x40; // start with max vol + uint8 volume = _mainSfxVolume; // start with standard vol if (!SkyState::isCDVersion()) { // as long as we can't set the volume for sfx without changing the speech volume, @@ -1168,6 +1169,7 @@ void SkySound::fnStartFx(uint32 sound, uint8 channel) { volume = roomList[i].adlibVolume; if (SkyState::_systemVars.systemFlags & SF_ROLAND) volume = roomList[i].rolandVolume; + volume = (volume * _mainSfxVolume) >> 8; } // Check the flags, the sound may come on after a delay. |