aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-08-31 20:26:21 +0000
committerPaweł Kołodziejski2003-08-31 20:26:21 +0000
commit2533b23a601b053dd5394e8da9e787504d37e8ba (patch)
treeb9f35b8e7044d6ad18cc8917a88fcd58bc742ee2 /sky
parent54f5caedc5f93f6a7ae067f1fda08c2dedd79de1 (diff)
downloadscummvm-rg350-2533b23a601b053dd5394e8da9e787504d37e8ba.tar.gz
scummvm-rg350-2533b23a601b053dd5394e8da9e787504d37e8ba.tar.bz2
scummvm-rg350-2533b23a601b053dd5394e8da9e787504d37e8ba.zip
added mixer features: volume and pan control per channel
svn-id: r9944
Diffstat (limited to 'sky')
-rw-r--r--sky/intro.cpp9
-rw-r--r--sky/sound.cpp8
2 files changed, 10 insertions, 7 deletions
diff --git a/sky/intro.cpp b/sky/intro.cpp
index 2d1ced19b4..39b45716e2 100644
--- a/sky/intro.cpp
+++ b/sky/intro.cpp
@@ -717,7 +717,8 @@ bool SkyIntro::nextPart(uint16 *&data) {
// 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 @@ bool SkyIntro::nextPart(uint16 *&data) {
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);
diff --git a/sky/sound.cpp b/sky/sound.cpp
index 0488557506..d13b7db8ca 100644
--- a/sky/sound.cpp
+++ b/sky/sound.cpp
@@ -1054,7 +1054,7 @@ int SkySound::playSound(uint32 id, byte *sound, uint32 size, PlayingSoundHandle
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 @@ void SkySound::playSound(uint16 sound, uint16 volume, uint8 channel) {
_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 @@ bool SkySound::startSpeech(uint16 textNum) {
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;
}