[Scummvm-cvs-logs] CVS: scummvm/scumm player_mod.cpp,2.21,2.22 player_mod.h,2.19,2.20 sound.cpp,1.458,1.459 sound.h,1.87,1.88

Max Horn fingolfin at users.sourceforge.net
Tue May 10 17:04:26 CEST 2005


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

Modified Files:
	player_mod.cpp player_mod.h sound.cpp sound.h 
Log Message:
Moved some more stuff to namespace Audio (enough for tonight)

Index: player_mod.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_mod.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- player_mod.cpp	10 May 2005 23:48:38 -0000	2.21
+++ player_mod.cpp	11 May 2005 00:01:26 -0000	2.22
@@ -92,7 +92,7 @@
 	_channels[i].pan = pan;
 	_channels[i].freq = rate;
 	_channels[i].input = makeLinearInputStream(rate, Audio::Mixer::FLAG_AUTOFREE | (loopStart != loopEnd ? Audio::Mixer::FLAG_LOOP : 0), (const byte*)data, size, loopStart, loopEnd - loopStart);
-	_channels[i].converter = makeRateConverter(rate, _mixer->getOutputRate(), false, false);
+	_channels[i].converter = Audio::makeRateConverter(rate, _mixer->getOutputRate(), false, false);
 }
 
 void Player_MOD::stopChannel(int id) {
@@ -139,7 +139,7 @@
 		if (_channels[i].id == id) {
 			_channels[i].freq = freq;
 			delete _channels[i].converter;
-			_channels[i].converter = makeRateConverter(freq, _mixer->getOutputRate(), false, false);
+			_channels[i].converter = Audio::makeRateConverter(freq, _mixer->getOutputRate(), false, false);
 			break;
 		}
 	}
@@ -169,8 +169,8 @@
 		}
 		for (i = 0; i < MOD_MAXCHANS; i++)
 			if (_channels[i].id) {
-				st_volume_t vol_l = (127 - _channels[i].pan) * _channels[i].vol / 127;
-				st_volume_t vol_r = (127 + _channels[i].pan) * _channels[i].vol / 127;
+				Audio::st_volume_t vol_l = (127 - _channels[i].pan) * _channels[i].vol / 127;
+				Audio::st_volume_t vol_r = (127 + _channels[i].pan) * _channels[i].vol / 127;
 				_channels[i].converter->flow(*_channels[i].input, &data[dpos*2], dlen, vol_l, vol_r);
 			}
 		dpos += dlen;

Index: player_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_mod.h,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -d -r2.19 -r2.20
--- player_mod.h	10 May 2005 23:48:38 -0000	2.19
+++ player_mod.h	11 May 2005 00:01:26 -0000	2.20
@@ -26,7 +26,9 @@
 #include "scumm/scumm.h"
 #include "sound/audiostream.h"
 
-class RateConverter;
+namespace Audio {
+	class RateConverter;
+}
 
 namespace Scumm {
 
@@ -69,7 +71,7 @@
 		uint8 vol;
 		int8 pan;
 		uint16 freq;
-		RateConverter *converter;
+		Audio::RateConverter *converter;
 		AudioStream *input;
 	};
 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.458
retrieving revision 1.459
diff -u -d -r1.458 -r1.459
--- sound.cpp	10 May 2005 23:48:40 -0000	1.458
+++ sound.cpp	11 May 2005 00:01:28 -0000	1.459
@@ -668,7 +668,7 @@
 	addSoundToQueue2(1, 0, channel, 0);
 }
 
-void Sound::startTalkSound(uint32 offset, uint32 b, int mode, SoundHandle *handle) {
+void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle *handle) {
 	int num = 0, i;
 	int size = 0;
 	int id = -1;

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- sound.h	10 May 2005 22:56:13 -0000	1.87
+++ sound.h	11 May 2005 00:01:29 -0000	1.88
@@ -95,8 +95,8 @@
 	int16 _heMusicTracks;
 
 public:
-	SoundHandle _talkChannelHandle;	// Handle of mixer channel actor is talking on
-	SoundHandle _heSoundChannels[8];
+	Audio::SoundHandle _talkChannelHandle;	// Handle of mixer channel actor is talking on
+	Audio::SoundHandle _heSoundChannels[8];
 
 	bool _soundsPaused;
 	byte _sfxMode;
@@ -110,7 +110,7 @@
 	void setOverrideFreq(int freq);
 	void playSound(int soundID, int heOffset, int heChannel, int heFlags);
 	void startHETalkSound(uint32 offset);
-	void startTalkSound(uint32 offset, uint32 b, int mode, SoundHandle *handle = NULL);
+	void startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle *handle = NULL);
 	void stopTalkSound();
 	bool isMouthSyncOff(uint pos);
 	int getSoundElapsedTime(int sound) const;





More information about the Scummvm-git-logs mailing list