aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2007-02-03 19:05:53 +0000
committerMax Horn2007-02-03 19:05:53 +0000
commitcb49cbdd456a97c6e10bdc279624603bd9bd7b60 (patch)
treed1ef8edbfbe237973b6cdef96434a17c24c9c122 /engines/scumm
parent9c5e62fb0408aeae98dcc9124c7090453768879d (diff)
downloadscummvm-rg350-cb49cbdd456a97c6e10bdc279624603bd9bd7b60.tar.gz
scummvm-rg350-cb49cbdd456a97c6e10bdc279624603bd9bd7b60.tar.bz2
scummvm-rg350-cb49cbdd456a97c6e10bdc279624603bd9bd7b60.zip
* Reimplemented Mixer::pauseAll to simply invoke pause on all channels
(implying change of semantics) * Reordered the params of Mixer::playRaw (the SoundType now comes first, not last) * Removed Mixer::isPaused * Removed Mixer::getSoundElapsedTimeOfSoundID * Added some doxygen comments to the Mixer svn-id: r25356
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/cup_player_he.cpp2
-rw-r--r--engines/scumm/he/sound_he.cpp8
-rw-r--r--engines/scumm/sound.cpp10
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp
index 695d298be6..f2e181fb41 100644
--- a/engines/scumm/he/cup_player_he.cpp
+++ b/engines/scumm/he/cup_player_he.cpp
@@ -169,7 +169,7 @@ void CUP_Player::updateSfx() {
flags |= Audio::Mixer::FLAG_LOOP;
loopEnd = soundSize - 8;
}
- _mixer->playRaw(&sfxChannel->handle, soundData + 8, soundSize - 8, 11025, flags, -1, 255, 0, 0, loopEnd);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, &sfxChannel->handle, soundData + 8, soundSize - 8, 11025, flags, -1, 255, 0, 0, loopEnd);
}
} else {
warning("Unable to find a free channel to play sound %d", sfx->num);
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 931ef12c95..17cc10c59e 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -535,7 +535,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
musicFile.close();
if (_vm->_game.heversion == 70) {
- _mixer->playRaw(&_heSoundChannels[heChannel], spoolPtr, size, 11025, flags, soundID, 255, 0, 0,0, type);
+ _mixer->playRaw(type, &_heSoundChannels[heChannel], spoolPtr, size, 11025, flags, soundID, 255, 0, 0, 0);
return;
}
}
@@ -586,7 +586,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
}
_mixer->stopHandle(_heSoundChannels[heChannel]);
- _mixer->playRaw(&_heSoundChannels[heChannel], sound, size, rate, flags, soundID, 255, 0, 0,0, type);
+ _mixer->playRaw(type, &_heSoundChannels[heChannel], sound, size, rate, flags, soundID, 255, 0, 0,0);
}
// Support for sound in Humongous Entertainment games
else if (READ_BE_UINT32(ptr) == MKID_BE('DIGI') || READ_BE_UINT32(ptr) == MKID_BE('TALK')) {
@@ -642,7 +642,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
}
_mixer->stopHandle(_heSoundChannels[heChannel]);
- _mixer->playRaw(&_heSoundChannels[heChannel], ptr + heOffset + 8, size, rate, flags, soundID, 255, 0, 0,0, type);
+ _mixer->playRaw(type, &_heSoundChannels[heChannel], ptr + heOffset + 8, size, rate, flags, soundID, 255, 0, 0,0);
}
// Support for PCM music in 3DO versions of Humongous Entertainment games
@@ -660,7 +660,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
_mixer->stopID(_currentMusic);
_currentMusic = soundID;
- _mixer->playRaw(NULL, ptr + 8, size, rate, flags, soundID, 255, 0, 0,0, Audio::Mixer::kMusicSoundType);
+ _mixer->playRaw(Audio::Mixer::kMusicSoundType, NULL, ptr + 8, size, rate, flags, soundID, 255, 0, 0,0);
}
else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) {
if (_vm->_imuse) {
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 8a71b455e9..bde14d3c55 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -188,7 +188,7 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (char *)malloc(size);
memcpy(sound, ptr, size);
- _mixer->playRaw(NULL, sound, size, rate, flags, soundID);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, rate, flags, soundID);
}
// WORKAROUND bug # 1311447
else if (READ_BE_UINT32(ptr) == 0x460e200d) {
@@ -210,7 +210,7 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (char *)malloc(size);
memcpy(sound, ptr, size);
- _mixer->playRaw(NULL, sound, size, rate, flags, soundID);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, rate, flags, soundID);
}
// Support for sampled sound effects in Monkey Island 1 and 2
else if (READ_BE_UINT32(ptr) == MKID_BE('SBL ')) {
@@ -281,7 +281,7 @@ void Sound::playSound(int soundID) {
// Allocate a sound buffer, copy the data into it, and play
sound = (char *)malloc(size);
memcpy(sound, ptr + 6, size);
- _mixer->playRaw(NULL, sound, size, rate, flags, soundID);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, rate, flags, soundID);
}
else if ((_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 3) || READ_BE_UINT32(ptr) == MKID_BE('SOUN') || READ_BE_UINT32(ptr) == MKID_BE('TOWS')) {
@@ -334,7 +334,7 @@ void Sound::playSound(int soundID) {
if (loopEnd > 0)
flags |= Audio::Mixer::FLAG_LOOP;
- _mixer->playRaw(NULL, sound, waveSize, rate, flags, soundID, 255, 0, loopStart, loopEnd);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, waveSize, rate, flags, soundID, 255, 0, loopStart, loopEnd);
}
break;
case 1:
@@ -395,7 +395,7 @@ void Sound::playSound(int soundID) {
sound = (char *)malloc(size);
int vol = ptr[24] * 4;
memcpy(sound, ptr + READ_BE_UINT16(ptr + 8), size);
- _mixer->playRaw(NULL, sound, size, rate, Audio::Mixer::FLAG_AUTOFREE, soundID, vol, 0);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, NULL, sound, size, rate, Audio::Mixer::FLAG_AUTOFREE, soundID, vol, 0);
}
else {