[Scummvm-cvs-logs] CVS: scummvm/sky intro.cpp,1.34,1.35 sound.cpp,1.33,1.34
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun Aug 31 13:27:18 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv20285/sky
Modified Files:
intro.cpp sound.cpp
Log Message:
added mixer features: volume and pan control per channel
Index: intro.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/intro.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- intro.cpp 6 Aug 2003 23:49:50 -0000 1.34
+++ intro.cpp 31 Aug 2003 20:26:21 -0000 1.35
@@ -717,7 +717,8 @@
// probably use _skySound instead of calling playRaw()
// directly, but this will have to do for now.
memset(vData, 127, sizeof(struct dataFileHeader));
- _mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025, SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE);
+ _mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025,
+ SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE, 127, 0);
return true;
case WAITVOICE:
while (_voice)
@@ -733,11 +734,13 @@
return true;
case LOOPBG:
_mixer->stopID(SOUND_BG);
- _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, SOUND_BG);
+ _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
+ SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, 127, 0, SOUND_BG);
return true;
case PLAYBG:
_mixer->stopID(SOUND_BG);
- _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, SoundMixer::FLAG_UNSIGNED, SOUND_BG);
+ _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
+ SoundMixer::FLAG_UNSIGNED, SOUND_BG, 127, 0);
return true;
case STOPBG:
_mixer->stopID(SOUND_BG);
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- sound.cpp 20 Aug 2003 12:12:11 -0000 1.33
+++ sound.cpp 31 Aug 2003 20:26:21 -0000 1.34
@@ -1054,7 +1054,7 @@
memcpy(buffer, sound+sizeof(struct dataFileHeader), size);
_mixer->stopID(id);
- return _mixer->playRaw(handle, buffer, size, 11025, flags, id);
+ return _mixer->playRaw(handle, buffer, size, 11025, flags, 127, 0, id);
}
void SkySound::loadSection(uint8 pSection) {
@@ -1130,9 +1130,9 @@
_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, 127, 0, SOUND_CH0, loopSta, loopEnd);
else
- _mixer->playRaw(&_ingameSound1, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH1, loopSta, loopEnd);
+ _mixer->playRaw(&_ingameSound1, _soundData + dataOfs, dataSize, sampleRate, flags, 127, 0, SOUND_CH1, loopSta, loopEnd);
}
void SkySound::fnStartFx(uint32 sound, uint8 channel) {
@@ -1251,6 +1251,6 @@
free(speechData);
_mixer->stopID(SOUND_SPEECH);
- _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, SOUND_SPEECH);
+ _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, 127, 0, SOUND_SPEECH);
return true;
}
More information about the Scummvm-git-logs
mailing list