[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.36,1.37
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Mon Sep 8 23:38:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv32258/sky
Modified Files:
sound.cpp
Log Message:
fix sfx routine
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- sound.cpp 5 Sep 2003 22:09:56 -0000 1.36
+++ sound.cpp 9 Sep 2003 06:37:01 -0000 1.37
@@ -1128,11 +1128,10 @@
flags |= SoundMixer::FLAG_LOOP;
}
- _mixer->setVolume(volume);
if (channel == 0)
- _mixer->playRaw(&_ingameSound0, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH0, loopSta, loopEnd);
+ _mixer->playRaw(&_ingameSound0, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH0, volume, 0, loopSta, loopEnd);
else
- _mixer->playRaw(&_ingameSound1, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH1, loopSta, loopEnd);
+ _mixer->playRaw(&_ingameSound1, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH1, volume, 0, loopSta, loopEnd);
}
void SkySound::fnStartFx(uint32 sound, uint8 channel) {
@@ -1162,15 +1161,11 @@
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,
- // we're better off not setting it at all.
- if (SkyState::_systemVars.systemFlags & SF_SBLASTER)
- volume = roomList[i].adlibVolume;
- if (SkyState::_systemVars.systemFlags & SF_ROLAND)
- volume = roomList[i].rolandVolume;
- volume = (volume * _mainSfxVolume) >> 8;
- }
+ if (SkyState::_systemVars.systemFlags & SF_SBLASTER)
+ volume = roomList[i].adlibVolume;
+ else 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.
if (sfx->flags & SFXF_START_DELAY) {
More information about the Scummvm-git-logs
mailing list