[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.39,1.40 animation.h,1.17,1.18 credits.cpp,1.12,1.13 credits.h,1.3,1.4 logic.cpp,1.51,1.52 logic.h,1.14,1.15 music.cpp,1.42,1.43 music.h,1.19,1.20 sound.cpp,1.44,1.45 sound.h,1.19,1.20 sword1.cpp,1.86,1.87
Max Horn
fingolfin at users.sourceforge.net
Tue May 10 16:50:54 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon saveload.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 controls.cpp,1.88,1.89 controls.h,1.19,1.20 sound.cpp,1.59,1.60 sound.h,1.20,1.21 sword2.cpp,1.143,1.144
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29875/sword1
Modified Files:
animation.cpp animation.h credits.cpp credits.h logic.cpp
logic.h music.cpp music.h sound.cpp sound.h sword1.cpp
Log Message:
Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- animation.cpp 10 May 2005 22:56:21 -0000 1.39
+++ animation.cpp 10 May 2005 23:48:46 -0000 1.40
@@ -32,7 +32,7 @@
namespace Sword1 {
-AnimationState::AnimationState(Screen *scr, SoundMixer *snd, OSystem *sys)
+AnimationState::AnimationState(Screen *scr, Audio::Mixer *snd, OSystem *sys)
: BaseAnimationState(snd, sys, 640, 400), _scr(scr) {
}
@@ -80,7 +80,7 @@
return AudioStream::openStreamFile(name);
}
-MoviePlayer::MoviePlayer(Screen *scr, SoundMixer *snd, OSystem *sys)
+MoviePlayer::MoviePlayer(Screen *scr, Audio::Mixer *snd, OSystem *sys)
: _scr(scr), _snd(snd), _sys(sys) {
for (uint8 cnt = 0; cnt < INTRO_LOGO_OVLS; cnt++)
_logoOvls[cnt] = NULL;
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- animation.h 1 Jan 2005 16:20:17 -0000 1.17
+++ animation.h 10 May 2005 23:48:46 -0000 1.18
@@ -61,7 +61,7 @@
Screen *_scr;
public:
- AnimationState(Screen *scr, SoundMixer *snd, OSystem *sys);
+ AnimationState(Screen *scr, Audio::Mixer *snd, OSystem *sys);
~AnimationState();
void updateScreen();
OverlayColor *giveRgbBuffer(void);
@@ -80,7 +80,7 @@
class MoviePlayer {
public:
- MoviePlayer(Screen *scr, SoundMixer *snd, OSystem *sys);
+ MoviePlayer(Screen *scr, Audio::Mixer *snd, OSystem *sys);
~MoviePlayer(void);
void play(uint32 id);
private:
@@ -88,7 +88,7 @@
void processFrame(uint32 animId, AnimationState *anim, uint32 frameNo);
bool initOverlays(uint32 id);
Screen *_scr;
- SoundMixer *_snd;
+ Audio::Mixer *_snd;
OSystem *_sys;
static const char *_sequenceList[20];
Index: credits.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/credits.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- credits.cpp 10 May 2005 22:56:21 -0000 1.12
+++ credits.cpp 10 May 2005 23:48:46 -0000 1.13
@@ -66,7 +66,7 @@
};
-CreditsPlayer::CreditsPlayer(OSystem *pSystem, SoundMixer *pMixer) {
+CreditsPlayer::CreditsPlayer(OSystem *pSystem, Audio::Mixer *pMixer) {
_system = pSystem;
_mixer = pMixer;
_smlFont = _bigFont = NULL;
@@ -113,7 +113,7 @@
// everything's initialized, time to render and show the credits.
SoundHandle bgSound;
- _mixer->playInputStream(SoundMixer::kMusicSoundType, &bgSound, bgSoundStream, 0);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &bgSound, bgSoundStream, 0);
int relDelay = 0;
uint16 scrollY = 0;
Index: credits.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/credits.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- credits.h 1 Jan 2005 16:09:24 -0000 1.3
+++ credits.h 10 May 2005 23:48:46 -0000 1.4
@@ -23,7 +23,10 @@
#define BS1CREDITS_H
#include "common/util.h"
-class SoundMixer;
+
+namespace Audio {
+ class Mixer;
+}
class OSystem;
namespace Sword1 {
@@ -44,7 +47,7 @@
class CreditsPlayer {
public:
- CreditsPlayer(OSystem *pSystem, SoundMixer *pMixer);
+ CreditsPlayer(OSystem *pSystem, Audio::Mixer *pMixer);
void play(void);
private:
void generateFonts(ArcFile *arcFile);
@@ -58,7 +61,7 @@
uint8 _numChars;
OSystem *_system;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
uint8 *_smlFont, *_bigFont;
};
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- logic.cpp 8 May 2005 21:49:52 -0000 1.51
+++ logic.cpp 10 May 2005 23:48:46 -0000 1.52
@@ -48,7 +48,7 @@
uint32 Logic::_scriptVars[NUM_SCRIPT_VARS];
-Logic::Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, SoundMixer *mixer) {
+Logic::Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer) {
_objMan = pObjMan;
_resMan = resMan;
_screen = pScreen;
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- logic.h 1 Jan 2005 16:09:24 -0000 1.14
+++ logic.h 10 May 2005 23:48:47 -0000 1.15
@@ -47,7 +47,7 @@
class Logic {
public:
- Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, SoundMixer *mixer);
+ Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer);
~Logic(void);
void initialize(void);
void newScreen(uint32 screen);
@@ -62,7 +62,7 @@
private:
ObjectMan *_objMan;
OSystem *_system;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
ResMan *_resMan;
Screen *_screen;
Sound *_sound;
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/music.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- music.cpp 10 May 2005 22:56:21 -0000 1.42
+++ music.cpp 10 May 2005 23:48:47 -0000 1.43
@@ -48,12 +48,12 @@
_sampleBuf = (uint8*)malloc(SMP_BUFSIZE);
_sourceFile->incRef();
if (_sourceFile->isOpen() && loadWAVFromStream(*_sourceFile, size, rate, flags)) {
- _isStereo = (flags & SoundMixer::FLAG_STEREO) != 0;
+ _isStereo = (flags & Audio::Mixer::FLAG_STEREO) != 0;
_rate = rate;
if (pSize && (int)pSize < size)
size = pSize;
assert((uint32)size <= (source->size() - source->pos()));
- _bitsPerSample = ((flags & SoundMixer::FLAG_16BITS) != 0) ? 16 : 8;
+ _bitsPerSample = ((flags & Audio::Mixer::FLAG_16BITS) != 0) ? 16 : 8;
_samplesLeft = (size * 8) / _bitsPerSample;
if ((_bitsPerSample != 16) && (_bitsPerSample != 8))
error("WaveAudioStream: unknown wave type");
@@ -251,7 +251,7 @@
_looping = false;
}
-Music::Music(SoundMixer *pMixer) {
+Music::Music(Audio::Mixer *pMixer) {
_mixer = pMixer;
_sampleRate = pMixer->getOutputRate();
_converter[0] = NULL;
Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/music.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- music.h 10 May 2005 22:56:21 -0000 1.19
+++ music.h 10 May 2005 23:48:47 -0000 1.20
@@ -28,7 +28,9 @@
#include "sound/audiostream.h"
#include "sound/rate.h"
-class SoundMixer;
+namespace Audio {
+ class Mixer;
+}
namespace Sword1 {
@@ -84,7 +86,7 @@
class Music : public AudioStream {
public:
- Music(SoundMixer *pMixer);
+ Music(Audio::Mixer *pMixer);
~Music();
void startMusic(int32 tuneId, int32 loopFlag);
void fadeDown();
@@ -104,7 +106,7 @@
st_volume_t _volumeL, _volumeR;
MusicHandle _handles[2];
RateConverter *_converter[2];
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
uint32 _sampleRate;
Common::Mutex _mutex;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- sound.cpp 12 Mar 2005 18:56:07 -0000 1.44
+++ sound.cpp 10 May 2005 23:48:47 -0000 1.45
@@ -33,9 +33,9 @@
namespace Sword1 {
#define SOUND_SPEECH_ID 1
-#define SPEECH_FLAGS (SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LITTLE_ENDIAN)
+#define SPEECH_FLAGS (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_LITTLE_ENDIAN)
-Sound::Sound(const char *searchPath, SoundMixer *mixer, ResMan *pResMan) {
+Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan) {
strcpy(_filePath, searchPath);
_mixer = mixer;
_resMan = pResMan;
@@ -161,11 +161,11 @@
uint32 size = READ_LE_UINT32(sampleData + 0x28);
uint8 flags;
if (READ_LE_UINT16(sampleData + 0x22) == 16)
- flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_LITTLE_ENDIAN;
+ flags = Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN;
else
- flags = SoundMixer::FLAG_UNSIGNED;
+ flags = Audio::Mixer::FLAG_UNSIGNED;
if (READ_LE_UINT16(sampleData + 0x16) == 2)
- flags |= SoundMixer::FLAG_STEREO;
+ flags |= Audio::Mixer::FLAG_STEREO;
_mixer->playRaw(&elem->handle, sampleData + 0x2C, size, 11025, flags, elem->id, volume, pan);
}
} else
@@ -195,7 +195,7 @@
#ifdef USE_MAD
else if (_cowMode == CowMp3) {
_cowFile.seek(index);
- _mixer->playInputStream(SoundMixer::kSFXSoundType, &_speechHandle, makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(Audio::Mixer::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 @@
#ifdef USE_VORBIS
else if (_cowMode == CowVorbis) {
_cowFile.seek(index);
- _mixer->playInputStream(SoundMixer::kSFXSoundType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speechHandle, makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
for (int cnt = 0; cnt < 480; cnt++)
_waveVolume[cnt] = true;
_waveVolPos = 0;
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- sound.h 10 May 2005 22:56:22 -0000 1.19
+++ sound.h 10 May 2005 23:48:47 -0000 1.20
@@ -28,7 +28,9 @@
#include "sound/mixer.h"
#include "common/util.h"
-class SoundMixer;
+namespace Audio {
+ class Mixer;
+}
namespace Sword1 {
@@ -67,7 +69,7 @@
class Sound {
public:
- Sound(const char *searchPath, SoundMixer *mixer, ResMan *pResMan);
+ Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan);
~Sound(void);
void setSpeechVol(uint8 volL, uint8 volR) { _speechVolL = volL; _speechVolR = volR; };
void setSfxVol(uint8 volL, uint8 volR) { _sfxVolL = volL; _sfxVolR = volR; };
@@ -106,7 +108,7 @@
QueueElement _fxQueue[MAX_FXQ_LENGTH];
uint8 _endOfQueue;
- SoundMixer *_mixer;
+ Audio::Mixer *_mixer;
ResMan *_resMan;
char _filePath[100];
static const char _musicList[270];
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- sword1.cpp 10 May 2005 22:56:22 -0000 1.86
+++ sword1.cpp 10 May 2005 23:48:47 -0000 1.87
@@ -166,8 +166,8 @@
_resMan = new ResMan("swordres.rif");
debug(5, "Starting object manager");
_objectMan = new ObjectMan(_resMan);
- _mixer->setVolumeForSoundType(SoundMixer::kSFXSoundType, SoundMixer::kMaxMixerVolume);
- _mixer->setVolumeForSoundType(SoundMixer::kMusicSoundType, SoundMixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, Audio::Mixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxMixerVolume);
_mouse = new Mouse(_system, _resMan, _objectMan);
_screen = new Screen(_system, _resMan, _objectMan);
_music = new Music(_mixer);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon saveload.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 controls.cpp,1.88,1.89 controls.h,1.19,1.20 sound.cpp,1.59,1.60 sound.h,1.20,1.21 sword2.cpp,1.143,1.144
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list