aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-03-09 18:12:54 +0000
committerMax Horn2005-03-09 18:12:54 +0000
commit0ec193b4be4113ccbc24f26f7bb4cefc3e3d6a41 (patch)
tree16bc04d5b5ddc5945cf14bccb7ce53406aba0807
parent13b8f678fc0ee6ab14e3264c58e858061fe625fd (diff)
downloadscummvm-rg350-0ec193b4be4113ccbc24f26f7bb4cefc3e3d6a41.tar.gz
scummvm-rg350-0ec193b4be4113ccbc24f26f7bb4cefc3e3d6a41.tar.bz2
scummvm-rg350-0ec193b4be4113ccbc24f26f7bb4cefc3e3d6a41.zip
changing AudioDataType -> SoundType, so now the constant names match the name of the data type / the SoundMixer method names
svn-id: r17052
-rw-r--r--graphics/animation.cpp2
-rw-r--r--kyra/kyra.cpp4
-rw-r--r--queen/queen.cpp4
-rw-r--r--queen/sound.cpp6
-rw-r--r--saga/music.cpp4
-rw-r--r--saga/saga.cpp4
-rw-r--r--saga/sound.cpp2
-rw-r--r--scumm/imuse_digi/dimuse.cpp16
-rw-r--r--scumm/imuse_digi/dimuse_track.cpp16
-rw-r--r--scumm/script_v8.cpp6
-rw-r--r--scumm/scumm.cpp6
-rw-r--r--scumm/smush/smush_mixer.cpp2
-rw-r--r--scumm/smush/smush_player.cpp6
-rw-r--r--scumm/sound.cpp4
-rw-r--r--simon/simon.cpp4
-rw-r--r--simon/sound.cpp8
-rw-r--r--sky/sky.cpp4
-rw-r--r--sound/flac.cpp2
-rw-r--r--sound/mixer.h14
-rw-r--r--sound/mp3.cpp2
-rw-r--r--sound/softsynth/mt32.cpp2
-rw-r--r--sound/vorbis.cpp2
-rw-r--r--sword1/credits.cpp2
-rw-r--r--sword1/sound.cpp4
-rw-r--r--sword1/sword1.cpp4
-rw-r--r--sword2/controls.cpp14
-rw-r--r--sword2/driver/animation.cpp6
-rw-r--r--sword2/driver/d_sound.cpp2
-rw-r--r--sword2/sound.cpp4
-rw-r--r--sword2/sword2.cpp12
30 files changed, 84 insertions, 84 deletions
diff --git a/graphics/animation.cpp b/graphics/animation.cpp
index 883baff8e3..59d56e92c5 100644
--- a/graphics/animation.cpp
+++ b/graphics/animation.cpp
@@ -143,7 +143,7 @@ bool BaseAnimationState::init(const char *name, void *audioArg) {
bgSoundStream = createAudioStream(name, audioArg);
if (bgSoundStream != NULL) {
- _snd->playInputStream(SoundMixer::kSFXAudioDataType, &bgSound, bgSoundStream, -1, 255, 0, false);
+ _snd->playInputStream(SoundMixer::kSFXSoundType, &bgSound, bgSoundStream, -1, 255, 0, false);
} else {
warning("Cutscene: Could not open Audio Track for %s", name);
}
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp
index 4d4e1a245b..e96c861b7f 100644
--- a/kyra/kyra.cpp
+++ b/kyra/kyra.cpp
@@ -106,8 +106,8 @@ KyraEngine::KyraEngine(GameDetector *detector, OSystem *syst)
warning("Sound initialization failed.");
}
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
// gets the game
if (detector->_game.features & GF_KYRA1) {
diff --git a/queen/queen.cpp b/queen/queen.cpp
index cfa5c3b0db..91446723cb 100644
--- a/queen/queen.cpp
+++ b/queen/queen.cpp
@@ -405,9 +405,9 @@ int QueenEngine::init(GameDetector &detector) {
if (!_mixer->isReady())
warning("Sound initialisation failed");
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
// Set mixer music volume to maximum, since music volume is regulated by MusicPlayer's MIDI messages
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, SoundMixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, SoundMixer::kMaxMixerVolume);
int midiDriver = MidiDriver::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE);
MidiDriver *driver = MidiDriver::createMidi(midiDriver);
diff --git a/queen/sound.cpp b/queen/sound.cpp
index e4bd0cccd3..a93650ea7f 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -201,7 +201,7 @@ void SBSound::sfxPlay(const char *name, bool isSpeech) {
void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size));
}
#endif
@@ -209,7 +209,7 @@ void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
void OGGSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size));
}
#endif
@@ -217,7 +217,7 @@ void OGGSound::sfxPlay(const char *name, bool isSpeech) {
void FLACSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
File *f = _vm->resource()->giveCompressedSound(name, &size);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size));
}
#endif
diff --git a/saga/music.cpp b/saga/music.cpp
index 956bdaedae..d58c39676f 100644
--- a/saga/music.cpp
+++ b/saga/music.cpp
@@ -295,7 +295,7 @@ void MusicPlayer::stopMusic() {
Music::Music(SoundMixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer), _enabled(enabled), _adlib(false) {
_player = new MusicPlayer(driver);
_musicInitialized = 1;
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
if (_vm->getGameType() == GType_ITE) {
File file;
@@ -448,7 +448,7 @@ int Music::play(uint32 music_rn, uint16 flags) {
if (audioStream) {
debug(0, "Playing digitized music");
- _mixer->playInputStream(SoundMixer::kMusicAudioDataType, &_musicHandle, audioStream);
+ _mixer->playInputStream(SoundMixer::kMusicSoundType, &_musicHandle, audioStream);
return SUCCESS;
}
diff --git a/saga/saga.cpp b/saga/saga.cpp
index 1a339088e5..c1d3d1a0cf 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -138,8 +138,8 @@ SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst)
warning("Sound initialization failed.");
}
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_vm = this;
}
diff --git a/saga/sound.cpp b/saga/sound.cpp
index 2253ce8c5e..9db219934c 100644
--- a/saga/sound.cpp
+++ b/saga/sound.cpp
@@ -221,7 +221,7 @@ int Sound::playVoxVoice(SOUNDBUFFER *buf) {
AudioStream *audioStream;
audioStream = makeVOXStream(buf->s_buf, buf->s_buf_len);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_voiceHandle, audioStream);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, &_voiceHandle, audioStream);
return SUCCESS;
}
diff --git a/scumm/imuse_digi/dimuse.cpp b/scumm/imuse_digi/dimuse.cpp
index 73a7deb882..a86afca775 100644
--- a/scumm/imuse_digi/dimuse.cpp
+++ b/scumm/imuse_digi/dimuse.cpp
@@ -187,14 +187,14 @@ void IMuseDigital::saveOrLoad(Serializer *ser) {
const int pan = (track->pan != 64) ? 2 * track->pan - 127 : 0;
const int vol = track->vol / 1000;
- SoundMixer::SoundType type = SoundMixer::kPlainAudioDataType;
+ SoundMixer::SoundType type = SoundMixer::kPlainSoundType;
if (track->volGroupId == 1)
- type = SoundMixer::kSpeechAudioDataType;
+ type = SoundMixer::kSpeechSoundType;
if (track->volGroupId == 2)
- type = SoundMixer::kSFXAudioDataType;
+ type = SoundMixer::kSFXSoundType;
if (track->volGroupId == 3)
- type = SoundMixer::kMusicAudioDataType;
+ type = SoundMixer::kMusicSoundType;
_vm->_mixer->playInputStream(type, &track->handle, track->stream, -1, vol, pan, false);
}
@@ -241,14 +241,14 @@ void IMuseDigital::callback() {
const int pan = (track->pan != 64) ? 2 * track->pan - 127 : 0;
const int vol = track->vol / 1000;
- SoundMixer::SoundType type = SoundMixer::kPlainAudioDataType;
+ SoundMixer::SoundType type = SoundMixer::kPlainSoundType;
if (track->volGroupId == 1)
- type = SoundMixer::kSpeechAudioDataType;
+ type = SoundMixer::kSpeechSoundType;
if (track->volGroupId == 2)
- type = SoundMixer::kSFXAudioDataType;
+ type = SoundMixer::kSFXSoundType;
if (track->volGroupId == 3)
- type = SoundMixer::kMusicAudioDataType;
+ type = SoundMixer::kMusicSoundType;
if (track->stream) {
byte *data = NULL;
diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp
index 21bf0aa5e2..dc1c38161f 100644
--- a/scumm/imuse_digi/dimuse_track.cpp
+++ b/scumm/imuse_digi/dimuse_track.cpp
@@ -163,14 +163,14 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType,
} else {
const int pan = (track->pan != 64) ? 2 * track->pan - 127 : 0;
const int vol = track->vol / 1000;
- SoundMixer::SoundType type = SoundMixer::kPlainAudioDataType;
+ SoundMixer::SoundType type = SoundMixer::kPlainSoundType;
if (track->volGroupId == 1)
- type = SoundMixer::kSpeechAudioDataType;
+ type = SoundMixer::kSpeechSoundType;
if (track->volGroupId == 2)
- type = SoundMixer::kSFXAudioDataType;
+ type = SoundMixer::kSFXSoundType;
if (track->volGroupId == 3)
- type = SoundMixer::kMusicAudioDataType;
+ type = SoundMixer::kMusicSoundType;
// setup 1 second stream wrapped buffer
int32 streamBufferSize = track->iteration;
@@ -303,14 +303,14 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDel
fadeTrack->volFadeStep = (fadeTrack->volFadeDest - fadeTrack->vol) * 60 * (1000 / _callbackFps) / (1000 * fadeDelay);
fadeTrack->volFadeUsed = true;
- SoundMixer::SoundType type = SoundMixer::kPlainAudioDataType;
+ SoundMixer::SoundType type = SoundMixer::kPlainSoundType;
if (fadeTrack->volGroupId == 1)
- type = SoundMixer::kSpeechAudioDataType;
+ type = SoundMixer::kSpeechSoundType;
if (fadeTrack->volGroupId == 2)
- type = SoundMixer::kSFXAudioDataType;
+ type = SoundMixer::kSFXSoundType;
if (fadeTrack->volGroupId == 3)
- type = SoundMixer::kMusicAudioDataType;
+ type = SoundMixer::kMusicSoundType;
// setup 1 second stream wrapped buffer
int32 streamBufferSize = fadeTrack->iteration;
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index 7b026d49b0..0b76bf0f05 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1384,13 +1384,13 @@ void ScummEngine_v8::o8_kernelGetFunctions() {
}
break;
case 0xDD: // getGroupSfxVol
- push(_mixer->getVolumeForSoundType(SoundMixer::kSFXAudioDataType) / 2);
+ push(_mixer->getVolumeForSoundType(SoundMixer::kSFXSoundType) / 2);
break;
case 0xDE: // getGroupVoiceVol
- push(_mixer->getVolumeForSoundType(SoundMixer::kSpeechAudioDataType) / 2);
+ push(_mixer->getVolumeForSoundType(SoundMixer::kSpeechSoundType) / 2);
break;
case 0xDF: // getGroupMusicVol
- push(_mixer->getVolumeForSoundType(SoundMixer::kMusicAudioDataType) / 2);
+ push(_mixer->getVolumeForSoundType(SoundMixer::kMusicSoundType) / 2);
break;
case 0xE0: // readRegistryValue
{
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index a7e40493d5..d0355ae35d 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1595,9 +1595,9 @@ void ScummEngine::setupVolumes() {
_musicEngine->setMusicVolume(soundVolumeMusic);
}
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, soundVolumeSfx);
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, soundVolumeMusic);
- _mixer->setVolumeForSoundType(SoundMixer::kSpeechAudioDataType, soundVolumeSpeech);
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, soundVolumeSfx);
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, soundVolumeMusic);
+ _mixer->setVolumeForSoundType(SoundMixer::kSpeechSoundType, soundVolumeSpeech);
}
diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp
index fdfb154869..791b689491 100644
--- a/scumm/smush/smush_mixer.cpp
+++ b/scumm/smush/smush_mixer.cpp
@@ -122,7 +122,7 @@ bool SmushMixer::handleFrame() {
if (_mixer->isReady()) {
if (!_channels[i].handle.isActive()) {
_channels[i].stream = makeAppendableAudioStream(rate, flags, 500000);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_channels[i].handle, _channels[i].stream);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream);
}
_mixer->setChannelVolume(_channels[i].handle, vol);
_mixer->setChannelBalance(_channels[i].handle, pan);
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 236efd0d6a..093108082e 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -509,7 +509,7 @@ void SmushPlayer::handleIACT(Chunk &b) {
if (!_IACTchannel.isActive()) {
_IACTstream = makeAppendableAudioStream(22050, SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 400000);
- _vm->_mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_IACTchannel, _IACTstream);
+ _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_IACTchannel, _IACTstream);
}
_IACTstream->append(output_data, 0x1000);
@@ -1192,7 +1192,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (_compressedFile.isOpen()) {
int size = _compressedFile.size();
_compressedFileMode = true;
- _vm->_mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
+ _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
return;
}
#endif
@@ -1203,7 +1203,7 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (_compressedFile.isOpen()) {
int size = _compressedFile.size();
_compressedFileMode = true;
- _vm->_mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
+ _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
return;
}
#endif
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index ec88299ef4..23584b6a76 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -772,7 +772,7 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle
//_vm->_imuseDigital->stopSound(kTalkSoundID);
_vm->_imuseDigital->startVoice(kTalkSoundID, input);
} else {
- _vm->_mixer->playInputStream(SoundMixer::kSFXAudioDataType, handle, input, id);
+ _vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, handle, input, id);
}
}
}
@@ -1139,7 +1139,7 @@ ScummFile *Sound::openSfxFile() {
}
bool Sound::isSfxFinished() const {
- return !_vm->_mixer->hasActiveChannelOfType(SoundMixer::kSFXAudioDataType);
+ return !_vm->_mixer->hasActiveChannelOfType(SoundMixer::kSFXSoundType);
}
// We use a real timer in an attempt to get better sync with CD tracks. This is
diff --git a/simon/simon.cpp b/simon/simon.cpp
index cd6fcfde38..cb12bce8b4 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -666,7 +666,7 @@ int SimonEngine::init(GameDetector &detector) {
warning("Sound initialization failed. "
"Features of the game that depend on sound synchronization will most likely break");
set_volume(ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_system->beginGFXTransaction();
initCommonGFX(detector);
@@ -4226,7 +4226,7 @@ void SimonEngine::dx_unlock_attached() {
}
void SimonEngine::set_volume(int volume) {
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, volume);
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, volume);
}
byte SimonEngine::getByte() {
diff --git a/simon/sound.cpp b/simon/sound.cpp
index acd4dc0f16..4c2cb6a924 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -129,7 +129,7 @@ void WavSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
error("playWav(%d): can't read WAVE header", sound);
}
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, handle, stream);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, stream);
}
void VocSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
@@ -177,7 +177,7 @@ void MP3Sound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, handle, makeMP3Stream(_file, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeMP3Stream(_file, size));
}
#endif
@@ -201,7 +201,7 @@ void VorbisSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, handle, makeVorbisStream(_file, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeVorbisStream(_file, size));
}
#endif
@@ -225,7 +225,7 @@ void FlacSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, handle, makeFlacStream(_file, size));
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeFlacStream(_file, size));
}
#endif
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 28021847c2..ad7a944b2b 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -240,8 +240,8 @@ int SkyEngine::init(GameDetector &detector) {
if (!_mixer->isReady())
warning("Sound initialisation failed");
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_floppyIntro = ConfMan.getBool("alt_intro");
_skyDisk = new Disk(_gameDataPath);
diff --git a/sound/flac.cpp b/sound/flac.cpp
index ff56ed6ee8..eb8e0a1bec 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -783,7 +783,7 @@ void FlacTrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int star
flac->setLastSample(0);
if (flac->seekAbsolute(static_cast<FLAC__uint64>(startFrame) * (info.sample_rate / 75))) {
- mixer->playInputStream(SoundMixer::kMusicAudioDataType, handle, flac);
+ mixer->playInputStream(SoundMixer::kMusicSoundType, handle, flac);
return;
}
// startSample is beyond the existing Samples
diff --git a/sound/mixer.h b/sound/mixer.h
index b75edcb4b0..aef5602c03 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -71,11 +71,11 @@ public:
};
enum SoundType {
- kPlainAudioDataType = 0,
+ kPlainSoundType = 0,
- kMusicAudioDataType = 1,
- kSFXAudioDataType = 2,
- kSpeechAudioDataType = 3
+ kMusicSoundType = 1,
+ kSFXSoundType = 2,
+ kSpeechSoundType = 3
};
enum {
@@ -126,7 +126,7 @@ public:
* is not limited to it. The premix stream is invoked by the mixer whenever
* it needs to generate any data, before any other mixing takes place.
*/
- void setupPremix(AudioStream *stream, SoundType type = kPlainAudioDataType);
+ void setupPremix(AudioStream *stream, SoundType type = kPlainSoundType);
@@ -140,7 +140,7 @@ public:
void *sound, uint32 size, uint rate, byte flags,
int id = -1, byte volume = 255, int8 balance = 0,
uint32 loopStart = 0, uint32 loopEnd = 0,
- SoundType type = kSFXAudioDataType);
+ SoundType type = kSFXSoundType);
/**
* Start playing the given audio input stream.
@@ -245,7 +245,7 @@ public:
/**
* Check whether any channel of the given sound type is active.
* For example, this can be used to check whether any SFX sound
- * is currently playing, by checking for type kSFXAudioDataType.
+ * is currently playing, by checking for type kSFXSoundType.
*
* @param type the sound type to look for
* @return true if any channels of the specified type are active.
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 47c93a4df7..708d3396b9 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -380,7 +380,7 @@ void MP3TrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int start
// Play it
AudioStream *input = new MP3InputStream(_file, durationTime);
- mixer->playInputStream(SoundMixer::kMusicAudioDataType, handle, input);
+ mixer->playInputStream(SoundMixer::kMusicSoundType, handle, input);
}
MP3TrackInfo::~MP3TrackInfo() {
diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp
index 61c4e9ff04..ad3f41af6d 100644
--- a/sound/softsynth/mt32.cpp
+++ b/sound/softsynth/mt32.cpp
@@ -269,7 +269,7 @@ int MidiDriver_MT32::open() {
_initialising = false;
g_system->clearScreen();
g_system->updateScreen();
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_handle, this, -1, 255, 0, false, true);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, &_handle, this, -1, 255, 0, false, true);
return 0;
}
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index e79a5f8552..8886a63a05 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -178,7 +178,7 @@ void VorbisTrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int st
#endif
AudioStream *input = makeVorbisStream(&_ov_file, duration * ov_info(&_ov_file, -1)->rate / 75);
- mixer->playInputStream(SoundMixer::kMusicAudioDataType, handle, input);
+ mixer->playInputStream(SoundMixer::kMusicSoundType, handle, input);
}
DigitalTrackInfo *getVorbisTrack(int track) {
diff --git a/sword1/credits.cpp b/sword1/credits.cpp
index 527bf74a0f..9db7217156 100644
--- a/sword1/credits.cpp
+++ b/sword1/credits.cpp
@@ -113,7 +113,7 @@ void CreditsPlayer::play(void) {
// everything's initialized, time to render and show the credits.
PlayingSoundHandle bgSound;
- _mixer->playInputStream(SoundMixer::kMusicAudioDataType, &bgSound, bgSoundStream, 0);
+ _mixer->playInputStream(SoundMixer::kMusicSoundType, &bgSound, bgSoundStream, 0);
int relDelay = 0;
uint16 scrollY = 0;
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index 6c0e0c3e8f..a55c476448 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -195,7 +195,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
#ifdef USE_MAD
else if (_cowMode == CowMp3) {
_cowFile.seek(index);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_speechHandle, makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, &_speechHandle, makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
// with compressed audio, we can't calculate the wave volume.
// so default to talking.
for (int cnt = 0; cnt < 480; cnt++)
@@ -206,7 +206,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
#ifdef USE_VORBIS
else if (_cowMode == CowVorbis) {
_cowFile.seek(index);
- _mixer->playInputStream(SoundMixer::kSFXAudioDataType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(SoundMixer::kSFXSoundType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
for (int cnt = 0; cnt < 480; cnt++)
_waveVolume[cnt] = true;
_waveVolPos = 0;
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp
index 9ea9d3e4a9..abfc98a528 100644
--- a/sword1/sword1.cpp
+++ b/sword1/sword1.cpp
@@ -166,8 +166,8 @@ int SwordEngine::init(GameDetector &detector) {
_resMan = new ResMan("swordres.rif");
debug(5, "Starting object manager");
_objectMan = new ObjectMan(_resMan);
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, SoundMixer::kMaxMixerVolume);
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, SoundMixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, SoundMixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, SoundMixer::kMaxMixerVolume);
_mouse = new Mouse(_system, _resMan, _objectMan);
_screen = new Screen(_system, _resMan, _objectMan);
_music = new Music(_mixer);
diff --git a/sword2/controls.cpp b/sword2/controls.cpp
index 5d80b8ca8c..8f42521696 100644
--- a/sword2/controls.cpp
+++ b/sword2/controls.cpp
@@ -945,9 +945,9 @@ OptionsDialog::OptionsDialog(Sword2Engine *vm) : Dialog(vm) {
_speechSwitch->setValue(!_vm->_sound->isSpeechMute());
_fxSwitch->setValue(!_vm->_sound->isFxMute());
- _musicSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kMusicAudioDataType));
- _speechSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSpeechAudioDataType));
- _fxSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSFXAudioDataType));
+ _musicSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kMusicSoundType));
+ _speechSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSpeechSoundType));
+ _fxSlider->setValue(_mixer->getVolumeForSoundType(SoundMixer::kSFXSoundType));
_gfxSlider->setValue(_vm->_screen->getRenderLevel());
_gfxPreview->setState(_vm->_screen->getRenderLevel());
@@ -997,7 +997,7 @@ void OptionsDialog::onAction(Widget *widget, int result) {
if (widget == _musicSwitch) {
_vm->_sound->muteMusic(result != 0);
} else if (widget == _musicSlider) {
- _vm->_mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, result);
+ _vm->_mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, result);
_vm->_sound->muteMusic(result == 0);
_musicSwitch->setValue(result != 0);
} else if (widget == _speechSlider) {
@@ -1015,9 +1015,9 @@ void OptionsDialog::onAction(Widget *widget, int result) {
_vm->_sound->muteSpeech(!_speechSwitch->getValue());
_vm->_sound->muteFx(!_fxSwitch->getValue());
_vm->_sound->setReverseStereo(_reverseStereoSwitch->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, _musicSlider->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kSpeechAudioDataType, _speechSlider->getValue());
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, _fxSlider->getValue());
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, _musicSlider->getValue());
+ _mixer->setVolumeForSoundType(SoundMixer::kSpeechSoundType, _speechSlider->getValue());
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, _fxSlider->getValue());
_vm->_screen->setRenderLevel(_gfxSlider->getValue());
_vm->writeSettings();
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp
index 6d9a7db779..2f428b144f 100644
--- a/sword2/driver/animation.cpp
+++ b/sword2/driver/animation.cpp
@@ -182,7 +182,7 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], int32 lea
leadIn += sizeof(StandardHeader);
- _vm->_sound->playFx(&leadInHandle, leadIn, leadInLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicAudioDataType);
+ _vm->_sound->playFx(&leadInHandle, leadIn, leadInLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
}
byte *leadOut = NULL;
@@ -301,7 +301,7 @@ void MoviePlayer::playMPEG(const char *filename, MovieTextObject *text[], byte *
frameCounter++;
if (frameCounter == leadOutFrame && leadOut)
- _vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicAudioDataType);
+ _vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
OSystem::Event event;
while (_sys->pollEvent(event)) {
@@ -516,7 +516,7 @@ void MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte
// subtitles.
if (!skipCutscene && leadOut)
- _vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicAudioDataType);
+ _vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
_vm->_screen->setPalette(0, 256, oldPal, RDPAL_INSTANT);
}
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 070cb15754..755aa1d73c 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -771,7 +771,7 @@ int32 Sound::playCompSpeech(uint32 speechId, uint8 vol, int8 pan) {
p = -p;
// Start the speech playing
- _vm->_mixer->playInputStream(SoundMixer::kSpeechAudioDataType, &_soundHandleSpeech, input, -1, volume, p);
+ _vm->_mixer->playInputStream(SoundMixer::kSpeechSoundType, &_soundHandleSpeech, input, -1, volume, p);
return RD_OK;
}
diff --git a/sword2/sound.cpp b/sword2/sound.cpp
index 7c64474bbd..9955eb5490 100644
--- a/sword2/sound.cpp
+++ b/sword2/sound.cpp
@@ -81,7 +81,7 @@ Sound::Sound(Sword2Engine *vm) {
_mixBuffer = NULL;
_mixBufferLen = 0;
- _vm->_mixer->setupPremix(this, SoundMixer::kMusicAudioDataType);
+ _vm->_mixer->setupPremix(this, SoundMixer::kMusicSoundType);
}
Sound::~Sound() {
@@ -247,7 +247,7 @@ void Sound::queueFx(int32 res, int32 type, int32 delay, int32 volume, int32 pan)
}
int32 Sound::playFx(FxQueueEntry *fx) {
- return playFx(&fx->handle, fx->data, fx->len, fx->volume, fx->pan, (fx->type == FX_LOOP), SoundMixer::kSFXAudioDataType);
+ return playFx(&fx->handle, fx->data, fx->len, fx->volume, fx->pan, (fx->type == FX_LOOP), SoundMixer::kSFXSoundType);
}
int32 Sound::playFx(PlayingSoundHandle *handle, byte *data, uint32 len, uint8 vol, int8 pan, bool loop, SoundMixer::SoundType soundType) {
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 953d03b4cf..b77ddc60d1 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -188,9 +188,9 @@ void Sword2Engine::registerDefaultSettings() {
}
void Sword2Engine::readSettings() {
- _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, ConfMan.getInt("music_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kSpeechAudioDataType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kSFXAudioDataType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+ _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
setSubtitles(ConfMan.getBool("subtitles"));
_sound->muteMusic(ConfMan.getBool("music_mute"));
_sound->muteSpeech(ConfMan.getBool("speech_mute"));
@@ -201,9 +201,9 @@ void Sword2Engine::readSettings() {
}
void Sword2Engine::writeSettings() {
- ConfMan.set("music_volume", _mixer->getVolumeForSoundType(SoundMixer::kMusicAudioDataType));
- ConfMan.set("speech_volume", _mixer->getVolumeForSoundType(SoundMixer::kSpeechAudioDataType));
- ConfMan.set("sfx_volume", _mixer->getVolumeForSoundType(SoundMixer::kSFXAudioDataType));
+ ConfMan.set("music_volume", _mixer->getVolumeForSoundType(SoundMixer::kMusicSoundType));
+ ConfMan.set("speech_volume", _mixer->getVolumeForSoundType(SoundMixer::kSpeechSoundType));
+ ConfMan.set("sfx_volume", _mixer->getVolumeForSoundType(SoundMixer::kSFXSoundType));
ConfMan.set("music_mute", _sound->isMusicMute());
ConfMan.set("speech_mute", _sound->isSpeechMute());
ConfMan.set("sfx_mute", _sound->isFxMute());