[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

Max Horn fingolfin at users.sourceforge.net
Tue May 10 16:53:23 CEST 2005


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29875/sky

Modified Files:
	intro.cpp intro.h sky.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: intro.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/intro.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- intro.cpp	12 Mar 2005 18:56:04 -0000	1.56
+++ intro.cpp	10 May 2005 23:48:43 -0000	1.57
@@ -618,7 +618,7 @@
 	SEQEND
 };
 
-Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, SoundMixer *mixer, OSystem *system) {
+Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, Audio::Mixer *mixer, OSystem *system) {
 
 	_skyDisk = disk;
 	_skyScreen = screen;
@@ -739,7 +739,7 @@
 		// directly, but this will have to do for now.
 		memset(vData, 127, sizeof(struct dataFileHeader));
 		_mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025,
-				SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE);
+				Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED, SOUND_VOICE);
 		return true;
 	case WAITVOICE:
 		while (_mixer->isSoundHandleActive(_voice))
@@ -756,12 +756,12 @@
 	case LOOPBG:
 		_mixer->stopID(SOUND_BG);
 		_mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
-				SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, SOUND_BG);
+				Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_LOOP, SOUND_BG);
 		return true;
 	case PLAYBG:
 		_mixer->stopID(SOUND_BG);
 		_mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
-				SoundMixer::FLAG_UNSIGNED, SOUND_BG);
+				Audio::Mixer::FLAG_UNSIGNED, SOUND_BG);
 		return true;
 	case STOPBG:
 		_mixer->stopID(SOUND_BG);

Index: intro.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/intro.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- intro.h	12 Mar 2005 18:56:04 -0000	1.8
+++ intro.h	10 May 2005 23:48:44 -0000	1.9
@@ -36,7 +36,7 @@
 
 class Intro {
 public:
-	Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, SoundMixer *mixer, OSystem *system);
+	Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *text, Audio::Mixer *mixer, OSystem *system);
 	~Intro(void);
 	bool doIntro(bool floppyIntro);
 	bool _quitProg;
@@ -51,7 +51,7 @@
 	Sound *_skySound;
 	Text *_skyText;
 	OSystem *_system;
-	SoundMixer *_mixer;
+	Audio::Mixer *_mixer;
 
 	uint8 *_textBuf, *_saveBuf;
 	uint8 *_bgBuf;

Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- sky.cpp	9 May 2005 12:08:25 -0000	1.176
+++ sky.cpp	10 May 2005 23:48:44 -0000	1.177
@@ -283,8 +283,8 @@
 	if (!_mixer->isReady())
 		warning("Sound initialisation 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"));
 	_floppyIntro = ConfMan.getBool("alt_intro");
 
 	_skyDisk = new Disk(_gameDataPath);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- sound.cpp	12 Mar 2005 18:56:04 -0000	1.50
+++ sound.cpp	10 May 2005 23:48:44 -0000	1.51
@@ -1017,7 +1017,7 @@
 	{ 0, 0, 0, 0}
 };
 
-Sound::Sound(SoundMixer *mixer, Disk *pDisk, uint8 pVolume) {
+Sound::Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume) {
 	_skyDisk = pDisk;
 	_soundData = NULL;
 	_mixer = mixer;
@@ -1034,7 +1034,7 @@
 void Sound::playSound(uint32 id, byte *sound, uint32 size, SoundHandle *handle) {
 
 	byte flags = 0;
-	flags |= SoundMixer::FLAG_UNSIGNED|SoundMixer::FLAG_AUTOFREE;
+	flags |= Audio::Mixer::FLAG_UNSIGNED|Audio::Mixer::FLAG_AUTOFREE;
 	size -= sizeof(struct dataFileHeader);
 	byte *buffer = (byte *)malloc(size); 
 	memcpy(buffer, sound+sizeof(struct dataFileHeader), size);	
@@ -1105,13 +1105,13 @@
 	uint16 dataSize = (_sfxInfo[(sound << 3) | 2] << 8) | _sfxInfo[(sound << 3) | 3];
 	uint16 dataLoop = (_sfxInfo[(sound << 3) | 6] << 8) | _sfxInfo[(sound << 3) | 7];
 
-	byte flags = SoundMixer::FLAG_UNSIGNED;
+	byte flags = Audio::Mixer::FLAG_UNSIGNED;
 
 	uint32 loopSta = 0, loopEnd = 0;
 	if (dataLoop) {
 		loopSta = dataSize - dataLoop;
 		loopEnd = dataSize;
-		flags |= SoundMixer::FLAG_LOOP;
+		flags |= Audio::Mixer::FLAG_LOOP;
 	}
 	
 	if (channel == 0)
@@ -1242,7 +1242,7 @@
 		rate = 11025;
 
 	_mixer->stopID(SOUND_SPEECH);
-	_mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, SOUND_SPEECH);
+	_mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, rate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE, SOUND_SPEECH);
 	return true;
 }
 

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- sound.h	12 Mar 2005 18:56:05 -0000	1.27
+++ sound.h	10 May 2005 23:48:44 -0000	1.28
@@ -49,7 +49,7 @@
 
 public:
 
-	SoundMixer *_mixer;
+	Audio::Mixer *_mixer;
 	SoundHandle _voiceHandle;
 	SoundHandle _effectHandle;
 	SoundHandle _bgSoundHandle;
@@ -62,7 +62,7 @@
 	void playSound(uint32 id, byte *sound, uint32 size, SoundHandle *handle);
 
 public:
-	Sound(SoundMixer *mixer, Disk *pDisk, uint8 pVolume);
+	Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume);
 	~Sound(void);
 
 	void loadSection(uint8 pSection);





More information about the Scummvm-git-logs mailing list