[Scummvm-cvs-logs] SF.net SVN: scummvm:[54022] scummvm/trunk/sound

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 1 21:41:04 CET 2010


Revision: 54022
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54022&view=rev
Author:   fingolfin
Date:     2010-11-01 20:41:03 +0000 (Mon, 01 Nov 2010)

Log Message:
-----------
SOUND: Convert some (f)printf + fflush to debug

Modified Paths:
--------------
    scummvm/trunk/sound/decoders/wave.cpp
    scummvm/trunk/sound/rate_arm.cpp

Modified: scummvm/trunk/sound/decoders/wave.cpp
===================================================================
--- scummvm/trunk/sound/decoders/wave.cpp	2010-11-01 20:40:33 UTC (rev 54021)
+++ scummvm/trunk/sound/decoders/wave.cpp	2010-11-01 20:41:03 UTC (rev 54022)
@@ -90,15 +90,15 @@
 	if (blockAlign_ != 0)
 		*blockAlign_ = blockAlign;
 #if 0
-	printf("WAVE information:\n");
-	printf("  total size: %d\n", wavLength);
-	printf("  fmt size: %d\n", fmtLength);
-	printf("  type: %d\n", type);
-	printf("  numChannels: %d\n", numChannels);
-	printf("  samplesPerSec: %d\n", samplesPerSec);
-	printf("  avgBytesPerSec: %d\n", avgBytesPerSec);
-	printf("  blockAlign: %d\n", blockAlign);
-	printf("  bitsPerSample: %d\n", bitsPerSample);
+	debug("WAVE information:");
+	debug("  total size: %d", wavLength);
+	debug("  fmt size: %d", fmtLength);
+	debug("  type: %d", type);
+	debug("  numChannels: %d", numChannels);
+	debug("  samplesPerSec: %d", samplesPerSec);
+	debug("  avgBytesPerSec: %d", avgBytesPerSec);
+	debug("  blockAlign: %d", blockAlign);
+	debug("  bitsPerSample: %d", bitsPerSample);
 #endif
 
 	if (type != 1 && type != 2 && type != 17) {
@@ -152,7 +152,7 @@
 		offset = stream.readUint32LE();
 
 #if 0
-		printf("  found a '%s' tag of size %d\n", buf, offset);
+		debug("  found a '%s' tag of size %d", buf, offset);
 #endif
 	} while (memcmp(buf, "data", 4) != 0);
 

Modified: scummvm/trunk/sound/rate_arm.cpp
===================================================================
--- scummvm/trunk/sound/rate_arm.cpp	2010-11-01 20:40:33 UTC (rev 54021)
+++ scummvm/trunk/sound/rate_arm.cpp	2010-11-01 20:41:03 UTC (rev 54022)
@@ -168,18 +168,16 @@
                                     int16 *a, int b)
 {
 #ifdef DEBUG_RATECONV
-  fprintf(stderr, "Reading ptr=%x n%d\n", a, b);
-  fflush(stderr);
+	debug("Reading ptr=%x n%d", a, b);
 #endif
-  return input.readBuffer(a, b);
+	return input.readBuffer(a, b);
 }
 
 template<bool stereo, bool reverseStereo>
 int SimpleRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) {
 
 #ifdef DEBUG_RATECONV
-fprintf(stderr, "Simple st=%d rev=%d\n", stereo, reverseStereo);
-fflush(stderr);
+	debug("Simple st=%d rev=%d", stereo, reverseStereo);
 #endif
 	st_sample_t *ostart = obuf;
 
@@ -318,8 +316,7 @@
 int LinearRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) {
 
 #ifdef DEBUG_RATECONV
-fprintf(stderr, "Linear st=%d rev=%d\n", stereo, reverseStereo);
-fflush(stderr);
+	debug("Linear st=%d rev=%d", stereo, reverseStereo);
 #endif
 	st_sample_t *ostart = obuf;
 
@@ -393,8 +390,7 @@
 		assert(input.isStereo() == stereo);
 
 #ifdef DEBUG_RATECONV
-fprintf(stderr, "Copy st=%d rev=%d\n", stereo, reverseStereo);
-fflush(stderr);
+		debug("Copy st=%d rev=%d", stereo, reverseStereo);
 #endif
 		st_size_t len;
                 st_sample_t *ostart = obuf;


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