[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_mixer.cpp,1.42,1.43 smush_mixer.h,1.14,1.15 smush_player.cpp,1.160,1.161

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


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

Modified Files:
	smush_mixer.cpp smush_mixer.h smush_player.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: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- smush_mixer.cpp	6 May 2005 04:44:54 -0000	1.42
+++ smush_mixer.cpp	10 May 2005 23:48:42 -0000	1.43
@@ -33,7 +33,7 @@
 
 namespace Scumm {
 
-SmushMixer::SmushMixer(SoundMixer *m) :
+SmushMixer::SmushMixer(Audio::Mixer *m) :
 	_mixer(m),
 	_soundFrequency(22050) {
 	for (int32 i = 0; i < NUM_CHANNELS; i++) {
@@ -109,27 +109,27 @@
 
 				_channels[i].chan->getParameters(rate, stereo, is_16bit, vol, pan);
 				int32 size = _channels[i].chan->availableSoundData();
-				byte flags = stereo ? SoundMixer::FLAG_STEREO : 0;
+				byte flags = stereo ? Audio::Mixer::FLAG_STEREO : 0;
 
 				if (is_16bit) {
 					data = malloc(size * (stereo ? 2 : 1) * 4);
 					_channels[i].chan->getSoundData((int16 *)data, size);
 					size *= stereo ? 4 : 2;
 
-					flags |= SoundMixer::FLAG_16BITS;
+					flags |= Audio::Mixer::FLAG_16BITS;
 
 				} else {
 					data = malloc(size * (stereo ? 2 : 1) * 2);
 					_channels[i].chan->getSoundData((int8 *)data, size);
 					size *= stereo ? 2 : 1;
 
-					flags |= SoundMixer::FLAG_UNSIGNED;
+					flags |= Audio::Mixer::FLAG_UNSIGNED;
 				}
 
 				if (_mixer->isReady()) {
 					if (!_channels[i].stream) {
 						_channels[i].stream = makeAppendableAudioStream(rate, flags, 500000);
-						_mixer->playInputStream(SoundMixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream);
+						_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream);
 					}
 					_mixer->setChannelVolume(_channels[i].handle, vol);
 					_mixer->setChannelBalance(_channels[i].handle, pan);

Index: smush_mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- smush_mixer.h	4 Apr 2005 18:42:35 -0000	1.14
+++ smush_mixer.h	10 May 2005 23:48:42 -0000	1.15
@@ -35,7 +35,7 @@
 	};
 private:
 
-	SoundMixer *_mixer;
+	Audio::Mixer *_mixer;
 	struct channels {
 		int id;
 		SmushChannel *chan;
@@ -49,7 +49,7 @@
 
 public:
 
-	SmushMixer(SoundMixer *);
+	SmushMixer(Audio::Mixer *);
 	virtual ~SmushMixer();
 	SmushChannel *findChannel(int32 track);
 	void addChannel(SmushChannel *c);

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- smush_player.cpp	10 May 2005 23:17:34 -0000	1.160
+++ smush_player.cpp	10 May 2005 23:48:42 -0000	1.161
@@ -511,8 +511,8 @@
 					} while (--count);
 
 					if (!_IACTstream) {
-						_IACTstream = makeAppendableAudioStream(22050, SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 400000);
-						_vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_IACTchannel, _IACTstream);
+						_IACTstream = makeAppendableAudioStream(22050, Audio::Mixer::FLAG_STEREO | Audio::Mixer::FLAG_16BITS, 400000);
+						_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_IACTchannel, _IACTstream);
 					}
 					_IACTstream->append(output_data, 0x1000);
 
@@ -1187,7 +1187,7 @@
 	if (_compressedFile.isOpen()) {
 		int size = _compressedFile.size();
 		_compressedFileMode = true;
-		_vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
+		_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, makeMP3Stream(&_compressedFile, size));
 		return;
 	}
 #endif
@@ -1198,7 +1198,7 @@
 	if (_compressedFile.isOpen()) {
 		int size = _compressedFile.size();
 		_compressedFileMode = true;
-		_vm->_mixer->playInputStream(SoundMixer::kSFXSoundType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
+		_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, makeVorbisStream(&_compressedFile, size));
 		return;
 	}
 #endif





More information about the Scummvm-git-logs mailing list