[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.63,1.64 animation.h,1.37,1.38 d_sound.cpp,1.149,1.150

Max Horn fingolfin at users.sourceforge.net
Tue May 10 16:50:54 CEST 2005


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

Modified Files:
	animation.cpp animation.h d_sound.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/sword2/driver/animation.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- animation.cpp	8 May 2005 17:13:08 -0000	1.63
+++ animation.cpp	10 May 2005 23:48:48 -0000	1.64
@@ -183,7 +183,7 @@
 
 		leadIn += sizeof(StandardHeader);
 
-		_vm->_sound->playFx(&leadInHandle, leadIn, leadInLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
+		_vm->_sound->playFx(&leadInHandle, leadIn, leadInLen, Audio::Mixer::kMaxChannelVolume, 0, false, Audio::Mixer::kMusicSoundType);
 	}
 
 	byte *leadOut = NULL;
@@ -248,7 +248,7 @@
 	uint frameCounter = 0, textCounter = 0;
 	SoundHandle handle;
 	bool skipCutscene = false, textVisible = false;
-	uint32 flags = SoundMixer::FLAG_16BITS;
+	uint32 flags = Audio::Mixer::FLAG_16BITS;
 	bool startNextText = false;
 
 	byte oldPal[256 * 4];
@@ -271,7 +271,7 @@
 	_vm->_screen->updateDisplay();
 
 #ifndef SCUMM_BIG_ENDIAN
-	flags |= SoundMixer::FLAG_LITTLE_ENDIAN;
+	flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
 #endif
 
 	while (!skipCutscene && anim->decodeFrame()) {
@@ -307,7 +307,7 @@
 		frameCounter++;
 
 		if (frameCounter == _leadOutFrame && leadOut)
-			_vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
+			_vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, Audio::Mixer::kMaxChannelVolume, 0, false, Audio::Mixer::kMusicSoundType);
 
 		OSystem::Event event;
 		while (_sys->pollEvent(event)) {
@@ -456,10 +456,10 @@
 
 	bool skipCutscene = false;
 
-	uint32 flags = SoundMixer::FLAG_16BITS;
+	uint32 flags = Audio::Mixer::FLAG_16BITS;
 
 #ifndef SCUMM_BIG_ENDIAN
-	flags |= SoundMixer::FLAG_LITTLE_ENDIAN;
+	flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
 #endif
 
 	while (1) {
@@ -527,7 +527,7 @@
 	// subtitles.
 
 	if (!skipCutscene && leadOut)
-		_vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, SoundMixer::kMaxChannelVolume, 0, false, SoundMixer::kMusicSoundType);
+		_vm->_sound->playFx(&_leadOutHandle, leadOut, leadOutLen, Audio::Mixer::kMaxChannelVolume, 0, false, Audio::Mixer::kMusicSoundType);
 
 	_vm->_screen->setPalette(0, 256, oldPal, RDPAL_INSTANT);
 }

Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- animation.h	2 May 2005 05:41:01 -0000	1.37
+++ animation.h	10 May 2005 23:48:48 -0000	1.38
@@ -73,7 +73,7 @@
 class MoviePlayer {
 private:
 	Sword2Engine *_vm;
-	SoundMixer *_snd;
+	Audio::Mixer *_snd;
 	OSystem *_sys;
 
 	byte *_textSurface;

Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- d_sound.cpp	10 May 2005 22:56:25 -0000	1.149
+++ d_sound.cpp	10 May 2005 23:48:48 -0000	1.150
@@ -643,7 +643,7 @@
 	_speechMuted = mute;
 
 	if (_vm->_mixer->isSoundHandleActive(_soundHandleSpeech)) {
-		uint volume = mute ? 0 : SoundMixer::kMaxChannelVolume;
+		uint volume = mute ? 0 : Audio::Mixer::kMaxChannelVolume;
 
 		_vm->_mixer->setChannelVolume(_soundHandleSpeech, volume);
 	}
@@ -764,14 +764,14 @@
 
 	// Modify the volume according to the master volume
 
-	byte volume = _speechMuted ? 0 : vol * SoundMixer::kMaxChannelVolume / 16;
+	byte volume = _speechMuted ? 0 : vol * Audio::Mixer::kMaxChannelVolume / 16;
 	int8 p = (pan * 127) / 16;
 
 	if (isReverseStereo())
 		p = -p;
 
 	// Start the speech playing
-	_vm->_mixer->playInputStream(SoundMixer::kSpeechSoundType, &_soundHandleSpeech, input, -1, volume, p);
+	_vm->_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundHandleSpeech, input, -1, volume, p);
 	return RD_OK;
 }
 
@@ -810,7 +810,7 @@
 	if (vol > 16)
 		vol = 16;
 
-	_fxQueue[id].volume = (vol * SoundMixer::kMaxChannelVolume) / 16;
+	_fxQueue[id].volume = (vol * Audio::Mixer::kMaxChannelVolume) / 16;
 
 	if (pan != 255) {
 		if (isReverseStereo())





More information about the Scummvm-git-logs mailing list