From af17c1ac5161b261c4c8c41e360dd5d11b7859d7 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Wed, 20 Aug 2003 12:12:11 +0000 Subject: copied some fixes which only were in 0.5.1 branch. svn-id: r9799 --- sky/sound.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sky/sound.cpp') 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. -- cgit v1.2.3