[Scummvm-cvs-logs] SF.net SVN: scummvm:[41763] scummvm/trunk/engines/cruise

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Mon Jun 22 12:41:32 CEST 2009


Revision: 41763
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41763&view=rev
Author:   dreammaster
Date:     2009-06-22 10:41:32 +0000 (Mon, 22 Jun 2009)

Log Message:
-----------
Removed redundant variation of the routine to play sound effects

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/function.cpp
    scummvm/trunk/engines/cruise/sound.cpp
    scummvm/trunk/engines/cruise/sound.h

Modified: scummvm/trunk/engines/cruise/function.cpp
===================================================================
--- scummvm/trunk/engines/cruise/function.cpp	2009-06-22 10:30:09 UTC (rev 41762)
+++ scummvm/trunk/engines/cruise/function.cpp	2009-06-22 10:41:32 UTC (rev 41763)
@@ -209,8 +209,8 @@
 		if (speed == -1)
 			speed = filesDatabase[sampleNum].subData.transparency;
 
-		_vm->sound().startSound(channelNum, filesDatabase[sampleNum].subData.ptr,
-			filesDatabase[sampleNum].width, speed, volume, false);
+		_vm->sound().playSound(channelNum, filesDatabase[sampleNum].subData.ptr,
+			filesDatabase[sampleNum].width, volume);
 	}
 
 	return (0);
@@ -226,8 +226,8 @@
 		if (speed == -1)
 			speed = filesDatabase[sampleNum].subData.transparency;
 
-		_vm->sound().startSound(channelNum, filesDatabase[sampleNum].subData.ptr,
-			filesDatabase[sampleNum].width, speed, volume, true);
+		_vm->sound().playSound(channelNum, filesDatabase[sampleNum].subData.ptr,
+			filesDatabase[sampleNum].width, volume);
 	}
 
 	return (0);

Modified: scummvm/trunk/engines/cruise/sound.cpp
===================================================================
--- scummvm/trunk/engines/cruise/sound.cpp	2009-06-22 10:30:09 UTC (rev 41762)
+++ scummvm/trunk/engines/cruise/sound.cpp	2009-06-22 10:41:32 UTC (rev 41763)
@@ -757,7 +757,7 @@
 	_player->fadeOut();
 }
 
-void PCSound::playSound(int channel, int frequency, const uint8 *data, int size, int volumeStep, int stepCount, int volume, int repeat) {
+void PCSound::playSound(int channel, const uint8 *data, int size, int volume) {
 	debugC(5, kCruiseDebugSound, "PCSound::playSound() channel %d size %d", channel, size);
 	_soundDriver->playSample(data, size, channel, volume);
 }
@@ -814,11 +814,6 @@
 	_soundDriver->setChannelFrequency(channel, freq);
 }
 
-void PCSound::startSound(int channelNum, const byte *ptr, int size, int speed, int volume, bool loop) {
-	warning("TODO: validate startSound");
-	playSound(channelNum, speed, ptr, size, 0, 0, volume, loop);
-}
-
 void PCSound::doSync(Common::Serializer &s) {
 	_player->doSync(s);
 	s.syncAsSint16LE(_genVolume);

Modified: scummvm/trunk/engines/cruise/sound.h
===================================================================
--- scummvm/trunk/engines/cruise/sound.h	2009-06-22 10:30:09 UTC (rev 41762)
+++ scummvm/trunk/engines/cruise/sound.h	2009-06-22 10:41:32 UTC (rev 41763)
@@ -55,8 +55,7 @@
 	virtual void removeMusic();
 	virtual void fadeOutMusic();
 
-	virtual void playSound(int channel, int frequency, const uint8 *data, int size, int volumeStep, int stepCount, int volume, int repeat);
-	virtual void startSound(int channelNum, const byte *ptr, int size, int speed, int volume, bool loop);
+	virtual void playSound(int channel, const uint8 *data, int size, int volume);
 	virtual void stopSound(int channel);
 	
 	void doSync(Common::Serializer &s);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list