aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorMax Horn2005-05-10 23:48:48 +0000
committerMax Horn2005-05-10 23:48:48 +0000
commit1a615346abab8f234c3dbd1c55e78b179bca9d87 (patch)
treef687ac73ffbfa29088a403b6311bb4db13265fde /saga
parent72f4c03b0b9a6918a359b967ebc400a2701981d9 (diff)
downloadscummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.tar.gz
scummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.tar.bz2
scummvm-rg350-1a615346abab8f234c3dbd1c55e78b179bca9d87.zip
Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
svn-id: r18039
Diffstat (limited to 'saga')
-rw-r--r--saga/music.cpp6
-rw-r--r--saga/music.h4
-rw-r--r--saga/saga.cpp4
-rw-r--r--saga/sndres.cpp2
-rw-r--r--saga/sound.cpp16
-rw-r--r--saga/sound.h4
6 files changed, 18 insertions, 18 deletions
diff --git a/saga/music.cpp b/saga/music.cpp
index 2a6e1b9d82..9a44d0ed38 100644
--- a/saga/music.cpp
+++ b/saga/music.cpp
@@ -279,10 +279,10 @@ void MusicPlayer::stopMusic() {
}
}
-Music::Music(SoundMixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer), _enabled(enabled), _adlib(false) {
+Music::Music(Audio::Mixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer), _enabled(enabled), _adlib(false) {
_player = new MusicPlayer(driver);
_musicInitialized = 1;
- _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
if (_vm->getGameType() == GType_ITE) {
Common::File file;
@@ -434,7 +434,7 @@ int Music::play(uint32 music_rn, uint16 flags) {
if (audioStream) {
debug(0, "Playing digitized music");
- _mixer->playInputStream(SoundMixer::kMusicSoundType, &_musicHandle, audioStream);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, audioStream);
return SUCCESS;
}
diff --git a/saga/music.h b/saga/music.h
index 993df56a27..9fcd66558d 100644
--- a/saga/music.h
+++ b/saga/music.h
@@ -106,7 +106,7 @@ protected:
class Music {
public:
- Music(SoundMixer *mixer, MidiDriver *driver, int enabled);
+ Music(Audio::Mixer *mixer, MidiDriver *driver, int enabled);
~Music(void);
void setNativeMT32(bool b) { _player->setNativeMT32(b); }
bool hasNativeMT32() { return _player->hasNativeMT32(); }
@@ -122,7 +122,7 @@ public:
private:
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
MusicPlayer *_player;
SoundHandle _musicHandle;
diff --git a/saga/saga.cpp b/saga/saga.cpp
index c3a5ff528d..591850b25f 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -158,8 +158,8 @@ SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst)
warning("Sound initialization failed.");
}
- _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_vm = this;
}
diff --git a/saga/sndres.cpp b/saga/sndres.cpp
index 2d77d3e779..6b12285a91 100644
--- a/saga/sndres.cpp
+++ b/saga/sndres.cpp
@@ -207,7 +207,7 @@ int SndRes::loadWavSound(byte *snd_res, size_t snd_res_len, SOUNDBUFFER *snd_buf
return FAILURE;
}
- snd_buf_i->s_stereo = ((flags & SoundMixer::FLAG_STEREO) != 0);
+ snd_buf_i->s_stereo = ((flags & Audio::Mixer::FLAG_STEREO) != 0);
snd_buf_i->s_freq = rate;
snd_buf_i->s_samplebits = 16;
snd_buf_i->s_signed = 1;
diff --git a/saga/sound.cpp b/saga/sound.cpp
index 2ba533d26a..ae1a14cf04 100644
--- a/saga/sound.cpp
+++ b/saga/sound.cpp
@@ -30,7 +30,7 @@
namespace Saga {
-Sound::Sound(SagaEngine *vm, SoundMixer *mixer, int enabled) :
+Sound::Sound(SagaEngine *vm, Audio::Mixer *mixer, int enabled) :
_vm(vm), _mixer(mixer), _enabled(enabled), _voxStream(0) {
_soundInitialized = 1;
@@ -53,20 +53,20 @@ int Sound::playSoundBuffer(SoundHandle *handle, SOUNDBUFFER *buf, int volume, bo
return FAILURE;
}
- flags = SoundMixer::FLAG_AUTOFREE;
+ flags = Audio::Mixer::FLAG_AUTOFREE;
if (loop)
- flags |= SoundMixer::FLAG_LOOP;
+ flags |= Audio::Mixer::FLAG_LOOP;
if (buf->s_samplebits == 16) {
- flags |= SoundMixer::FLAG_16BITS;
+ flags |= Audio::Mixer::FLAG_16BITS;
if (!(_vm->getFeatures() & GF_BIG_ENDIAN_DATA))
- flags |= SoundMixer::FLAG_LITTLE_ENDIAN;
+ flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
}
if (buf->s_stereo)
- flags |= SoundMixer::FLAG_STEREO;
+ flags |= Audio::Mixer::FLAG_STEREO;
if (!buf->s_signed)
- flags |= SoundMixer::FLAG_UNSIGNED;
+ flags |= Audio::Mixer::FLAG_UNSIGNED;
_mixer->playRaw(handle, buf->s_buf, buf->s_buf_len, buf->s_freq, flags, -1, volume);
@@ -120,7 +120,7 @@ int Sound::playVoxVoice(SOUNDBUFFER *buf) {
_voxStream = new Common::MemoryReadStream(buf->s_buf, buf->s_buf_len);
audioStream = makeADPCMStream(*_voxStream, buf->s_buf_len, kADPCMOki);
- _mixer->playInputStream(SoundMixer::kSFXSoundType, &_voiceHandle, audioStream);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_voiceHandle, audioStream);
return SUCCESS;
}
diff --git a/saga/sound.h b/saga/sound.h
index 4418583acb..4bf126edcf 100644
--- a/saga/sound.h
+++ b/saga/sound.h
@@ -48,7 +48,7 @@ struct SOUNDBUFFER {
class Sound {
public:
- Sound(SagaEngine *vm, SoundMixer *mixer, int enabled);
+ Sound(SagaEngine *vm, Audio::Mixer *mixer, int enabled);
~Sound();
int playSound(SOUNDBUFFER *buf, int volume, bool loop);
@@ -70,7 +70,7 @@ public:
int _enabled;
SagaEngine *_vm;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
Common::MemoryReadStream *_voxStream;
SoundHandle _effectHandle;