[Scummvm-cvs-logs] SF.net SVN: scummvm:[33666] scummvm/branches/gsoc2008-tfmx

marwanhilmi at users.sourceforge.net marwanhilmi at users.sourceforge.net
Wed Aug 6 21:53:32 CEST 2008


Revision: 33666
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33666&view=rev
Author:   marwanhilmi
Date:     2008-08-06 19:53:31 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
Fixed small problem with constructor and destructor. Tfmx object will properly delete itself now.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-tfmx/base/main.cpp
    scummvm/branches/gsoc2008-tfmx/sound/mods/tfmx.cpp

Modified: scummvm/branches/gsoc2008-tfmx/base/main.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/main.cpp	2008-08-06 19:21:45 UTC (rev 33665)
+++ scummvm/branches/gsoc2008-tfmx/base/main.cpp	2008-08-06 19:53:31 UTC (rev 33666)
@@ -299,8 +299,8 @@
 	//_aTfmx.playSong(0);
 	//_aTfmx.testMacro(9);
 
-	system.getMixer()->playInputStream( Audio::Mixer::kMusicSoundType, &_handle, &_aTfmx );
-	system.delayMillis( 999999 );
+	system.getMixer()->playInputStream( Audio::Mixer::kMusicSoundType, &_handle, &_aTfmx, -1, 255, 0, false);
+	system.delayMillis( 99 );
 	//Tfmx test end.
 
 

Modified: scummvm/branches/gsoc2008-tfmx/sound/mods/tfmx.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/sound/mods/tfmx.cpp	2008-08-06 19:21:45 UTC (rev 33665)
+++ scummvm/branches/gsoc2008-tfmx/sound/mods/tfmx.cpp	2008-08-06 19:53:31 UTC (rev 33666)
@@ -38,13 +38,13 @@
 
 Tfmx::Tfmx(bool stereo, int rate, int interruptFreq)
 	: Paula(stereo, rate, interruptFreq) {
+		_data = 0;
+		_trackData = 0;
+		_sampleData = 0;
 } 
 Tfmx::~Tfmx() {
-	if (_data)
 		delete[] _data;
-	if (_trackData)
 		delete[] _trackData;
-	if (_sampleData)
 		delete[] _sampleData;
 }
 void Tfmx::playSong(uint8 songNumber){


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