[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.503,1.504 sound.cpp,1.84,1.85 sound.h,1.24,1.25
Max Horn
fingolfin at users.sourceforge.net
Tue May 10 16:53:23 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky intro.cpp,1.56,1.57 intro.h,1.8,1.9 sky.cpp,1.176,1.177 sound.cpp,1.50,1.51 sound.h,1.27,1.28
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/music adlibmusic.cpp,1.24,1.25 adlibmusic.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29875/simon
Modified Files:
simon.cpp sound.cpp sound.h
Log Message:
Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.503
retrieving revision 1.504
diff -u -d -r1.503 -r1.504
--- simon.cpp 10 May 2005 22:56:16 -0000 1.503
+++ simon.cpp 10 May 2005 23:48:42 -0000 1.504
@@ -673,7 +673,7 @@
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::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
_system->beginGFXTransaction();
initCommonGFX(detector);
@@ -4254,7 +4254,7 @@
}
void SimonEngine::set_volume(int volume) {
- _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, volume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, volume);
}
byte SimonEngine::getByte() {
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- sound.cpp 10 May 2005 22:56:18 -0000 1.84
+++ sound.cpp 10 May 2005 23:48:43 -0000 1.85
@@ -40,35 +40,35 @@
protected:
File *_file;
uint32 *_offsets;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
bool _freeOffsets;
public:
- BaseSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false);
- BaseSound(SoundMixer *mixer, File *file, uint32 *offsets, bool bigendian = false);
+ BaseSound(Audio::Mixer *mixer, File *file, uint32 base = 0, bool bigendian = false);
+ BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, bool bigendian = false);
virtual ~BaseSound();
virtual void playSound(uint sound, SoundHandle *handle, byte flags) = 0;
};
class WavSound : public BaseSound {
public:
- WavSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
- WavSound(SoundMixer *mixer, File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {};
+ WavSound(Audio::Mixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
+ WavSound(Audio::Mixer *mixer, File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
class VocSound : public BaseSound {
public:
- VocSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
+ VocSound(Audio::Mixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
class RawSound : public BaseSound {
public:
- RawSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
+ RawSound(Audio::Mixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
-BaseSound::BaseSound(SoundMixer *mixer, File *file, uint32 base, bool bigendian) {
+BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigendian) {
_mixer = mixer;
_file = file;
@@ -106,7 +106,7 @@
_offsets[res] = _file->pos();
}
-BaseSound::BaseSound(SoundMixer *mixer, File *file, uint32 *offsets, bool bigendian) {
+BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, bool bigendian) {
_mixer = mixer;
_file = file;
_offsets = offsets;
@@ -131,7 +131,7 @@
error("playWav(%d): can't read WAVE header", sound);
}
- _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, stream);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream);
}
void VocSound::playSound(uint sound, SoundHandle *handle, byte flags) {
@@ -143,7 +143,7 @@
int size, samples_per_sec;
byte *buffer = loadVOCFromStream(*_file, size, samples_per_sec);
- _mixer->playRaw(handle, buffer, size, samples_per_sec, flags | SoundMixer::FLAG_AUTOFREE);
+ _mixer->playRaw(handle, buffer, size, samples_per_sec, flags | Audio::Mixer::FLAG_AUTOFREE);
}
void RawSound::playSound(uint sound, SoundHandle *handle, byte flags) {
@@ -156,13 +156,13 @@
byte *buffer = (byte *)malloc(size);
_file->read(buffer, size);
- _mixer->playRaw(handle, buffer, size, 22050, flags | SoundMixer::FLAG_AUTOFREE);
+ _mixer->playRaw(handle, buffer, size, 22050, flags | Audio::Mixer::FLAG_AUTOFREE);
}
#ifdef USE_MAD
class MP3Sound : public BaseSound {
public:
- MP3Sound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
+ MP3Sound(Audio::Mixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
@@ -179,14 +179,14 @@
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeMP3Stream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeMP3Stream(_file, size));
}
#endif
#ifdef USE_VORBIS
class VorbisSound : public BaseSound {
public:
- VorbisSound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
+ VorbisSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
@@ -203,14 +203,14 @@
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeVorbisStream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeVorbisStream(_file, size));
}
#endif
#ifdef USE_FLAC
class FlacSound : public BaseSound {
public:
- FlacSound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
+ FlacSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
void playSound(uint sound, SoundHandle *handle, byte flags);
};
@@ -227,11 +227,11 @@
uint32 size = _offsets[sound + i] - _offsets[sound];
- _mixer->playInputStream(SoundMixer::kSFXSoundType, handle, makeFlacStream(_file, size));
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, makeFlacStream(_file, size));
}
#endif
-Sound::Sound(const byte game, const GameSpecificSettings *gss, SoundMixer *mixer)
+Sound::Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mixer)
: _game(game), _mixer(mixer) {
_voice = 0;
_effects = 0;
@@ -444,7 +444,7 @@
return;
_mixer->stopHandle(_voiceHandle);
- _voice->playSound(sound, &_voiceHandle, (_game == GAME_SIMON1CD32) ? 0 : SoundMixer::FLAG_UNSIGNED);
+ _voice->playSound(sound, &_voiceHandle, (_game == GAME_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
}
void Sound::playEffects(uint sound) {
@@ -454,7 +454,7 @@
if (_effectsPaused)
return;
- _effects->playSound(sound, &_effectsHandle, (_game == GAME_SIMON1CD32) ? 0 : SoundMixer::FLAG_UNSIGNED);
+ _effects->playSound(sound, &_effectsHandle, (_game == GAME_SIMON1CD32) ? 0 : Audio::Mixer::FLAG_UNSIGNED);
}
void Sound::playAmbient(uint sound) {
@@ -470,7 +470,7 @@
return;
_mixer->stopHandle(_ambientHandle);
- _effects->playSound(sound, &_ambientHandle, SoundMixer::FLAG_LOOP|SoundMixer::FLAG_UNSIGNED);
+ _effects->playSound(sound, &_ambientHandle, Audio::Mixer::FLAG_LOOP|Audio::Mixer::FLAG_UNSIGNED);
}
bool Sound::hasVoice() const {
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- sound.h 10 May 2005 22:56:18 -0000 1.24
+++ sound.h 10 May 2005 23:48:43 -0000 1.25
@@ -32,7 +32,7 @@
private:
byte _game;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
BaseSound *_voice;
BaseSound *_effects;
@@ -53,7 +53,7 @@
uint _ambientPlaying;
public:
- Sound(const byte game, const GameSpecificSettings *gss, SoundMixer *mixer);
+ Sound(const byte game, const GameSpecificSettings *gss, Audio::Mixer *mixer);
~Sound();
void readSfxFile(const char *filename);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky intro.cpp,1.56,1.57 intro.h,1.8,1.9 sky.cpp,1.176,1.177 sound.cpp,1.50,1.51 sound.h,1.27,1.28
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/music adlibmusic.cpp,1.24,1.25 adlibmusic.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list