changeset 62:b13fafb976be

Changed _D macro to DBGSND.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 24 Sep 2001 15:31:25 +0000
parents 7d3a6ea7f1f0
children 9669aa13d3e0
files SDL_sound.c SDL_sound_internal.h decoders/aiff.c decoders/mod.c decoders/mp3.c decoders/raw.c decoders/skeleton.c decoders/voc.c decoders/wav.c
diffstat 9 files changed, 37 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/SDL_sound.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/SDL_sound.c	Mon Sep 24 15:31:25 2001 +0000
@@ -218,7 +218,7 @@
 {
     if (err != NULL)
     {
-        _D(("Sound_SetError(\"%s\");\n", err));
+        SNDDBG(("Sound_SetError(\"%s\");\n", err));
         SDL_SetError(err);
     } /* if */
 } /* Sound_SetError */
@@ -395,18 +395,18 @@
     } /* if */
     samplesList = sample;
 
-    _D(("New sample DESIRED format: %s format, %d rate, %d channels.\n",
-        fmt_to_str(sample->desired.format),
-        sample->desired.rate,
-        sample->desired.channels));
+    SNDDBG(("New sample DESIRED format: %s format, %d rate, %d channels.\n",
+            fmt_to_str(sample->desired.format),
+            sample->desired.rate,
+            sample->desired.channels));
 
-    _D(("New sample ACTUAL format: %s format, %d rate, %d channels.\n",
-        fmt_to_str(sample->actual.format),
-        sample->actual.rate,
-        sample->actual.channels));
+    SNDDBG(("New sample ACTUAL format: %s format, %d rate, %d channels.\n",
+            fmt_to_str(sample->actual.format),
+            sample->actual.rate,
+            sample->actual.channels));
 
-    _D(("On-the-fly conversion: %s.\n",
-        internal->sdlcvt.needed ? "ENABLED" : "DISABLED"));
+    SNDDBG(("On-the-fly conversion: %s.\n",
+            internal->sdlcvt.needed ? "ENABLED" : "DISABLED"));
 
     return(1);
 } /* init_sample */
--- a/SDL_sound_internal.h	Mon Sep 24 15:31:03 2001 +0000
+++ b/SDL_sound_internal.h	Mon Sep 24 15:31:25 2001 +0000
@@ -36,9 +36,9 @@
 #include "SDL.h"
 
 #if (defined DEBUG_CHATTER)
-#define _D(x) printf x
+#define SNDDBG(x) printf x
 #else
-#define _D(x)
+#define SNDDBG(x)
 #endif
 
 typedef struct __SOUND_DECODERFUNCTIONS__
--- a/decoders/aiff.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/aiff.c	Mon Sep 24 15:31:25 2001 +0000
@@ -151,7 +151,7 @@
 } /* AIFF_quit */
 
 
-/*
+/* 
  * Sample rate is encoded as an "80 bit IEEE Standard 754 floating point
  * number (Standard Apple Numeric Environment [SANE] data type Extended)".
  * Whose bright idea was that?
@@ -344,7 +344,7 @@
 
     sample->flags = SOUND_SAMPLEFLAG_NONE;
 
-    _D(("AIFF: Accepting data stream.\n"));
+    SNDDBG(("AIFF: Accepting data stream.\n"));
     return(1); /* we'll handle this data. */
 } /* AIFF_open */
 
--- a/decoders/mod.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/mod.c	Mon Sep 24 15:31:25 2001 +0000
@@ -237,7 +237,7 @@
     /* !!! FIXME: A little late to be giving this information... */
     sample->flags = SOUND_SAMPLEFLAG_NEEDSEEK;
 
-    _D(("MOD: Accepting data stream\n"));
+    SNDDBG(("MOD: Accepting data stream\n"));
     return(1); /* we'll handle this data. */
 } /* MOD_open */
 
--- a/decoders/mp3.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/mp3.c	Mon Sep 24 15:31:25 2001 +0000
@@ -89,7 +89,7 @@
     {
         SMPEG_version v;
         SMPEG_VERSION(&v);
-        _D(("MP3: Compiled against SMPEG v%d.%d.%d.\n",
+        SNDDBG(("MP3: Compiled against SMPEG v%d.%d.%d.\n",
                     v.major, v.minor, v.patch));
         first_time = 0;
     } /* if */
@@ -126,7 +126,7 @@
     refCounter = RWops_RWRefCounter_new(internal->rw);
     if (refCounter == NULL)
     {
-        _D(("MP3: Failed to create reference counting RWops.\n"));
+        SNDDBG(("MP3: Failed to create reference counting RWops.\n"));
         return(0);
     } /* if */
 
@@ -154,19 +154,19 @@
         return(0);
     } /* if */
 
-    _D(("MP3: Accepting data stream.\n"));
-    _D(("MP3: has_audio == {%s}.\n", smpeg_info.has_audio ? "TRUE" : "FALSE"));
-    _D(("MP3: has_video == {%s}.\n", smpeg_info.has_video ? "TRUE" : "FALSE"));
-    _D(("MP3: width == (%d).\n", smpeg_info.width));
-    _D(("MP3: height == (%d).\n", smpeg_info.height));
-    _D(("MP3: current_frame == (%d).\n", smpeg_info.current_frame));
-    _D(("MP3: current_fps == (%f).\n", smpeg_info.current_fps));
-    _D(("MP3: audio_string == [%s].\n", smpeg_info.audio_string));
-    _D(("MP3: audio_current_frame == (%d).\n", smpeg_info.audio_current_frame));
-    _D(("MP3: current_offset == (%d).\n", smpeg_info.current_offset));
-    _D(("MP3: total_size == (%d).\n", smpeg_info.total_size));
-    _D(("MP3: current_time == (%f).\n", smpeg_info.current_time));
-    _D(("MP3: total_time == (%f).\n", smpeg_info.total_time));
+    SNDDBG(("MP3: Accepting data stream.\n"));
+    SNDDBG(("MP3: has_audio == {%s}.\n", smpeg_info.has_audio ? "TRUE" : "FALSE"));
+    SNDDBG(("MP3: has_video == {%s}.\n", smpeg_info.has_video ? "TRUE" : "FALSE"));
+    SNDDBG(("MP3: width == (%d).\n", smpeg_info.width));
+    SNDDBG(("MP3: height == (%d).\n", smpeg_info.height));
+    SNDDBG(("MP3: current_frame == (%d).\n", smpeg_info.current_frame));
+    SNDDBG(("MP3: current_fps == (%f).\n", smpeg_info.current_fps));
+    SNDDBG(("MP3: audio_string == [%s].\n", smpeg_info.audio_string));
+    SNDDBG(("MP3: audio_current_frame == (%d).\n", smpeg_info.audio_current_frame));
+    SNDDBG(("MP3: current_offset == (%d).\n", smpeg_info.current_offset));
+    SNDDBG(("MP3: total_size == (%d).\n", smpeg_info.total_size));
+    SNDDBG(("MP3: current_time == (%f).\n", smpeg_info.current_time));
+    SNDDBG(("MP3: total_time == (%f).\n", smpeg_info.total_time));
 
     SMPEG_enablevideo(smpeg, 0);
     SMPEG_enableaudio(smpeg, 1);
--- a/decoders/raw.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/raw.c	Mon Sep 24 15:31:25 2001 +0000
@@ -112,7 +112,7 @@
         return(0);
     } /* if */
 
-    _D(("RAW: Accepting data stream.\n"));
+    SNDDBG(("RAW: Accepting data stream.\n"));
 
         /*
          * We never convert raw samples; what you ask for is what you get.
--- a/decoders/skeleton.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/skeleton.c	Mon Sep 24 15:31:25 2001 +0000
@@ -91,7 +91,7 @@
         return(0);
     } /* if */
 
-    _D(("FMT: Accepting data stream.\n"));
+    SNDDBG(("FMT: Accepting data stream.\n"));
     set up sample->actual;
     sample->flags = SOUND_SAMPLEFLAG_NONE;
     return(1); /* we'll handle this data. */
--- a/decoders/voc.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/voc.c	Mon Sep 24 15:31:25 2001 +0000
@@ -88,7 +88,7 @@
     Uint32  bufpos;         /* byte position in internal->buffer. */
 } vs_t;
 
-/* Size field */
+/* Size field */ 
 /* SJB: note that the 1st 3 are sometimes used as sizeof(type) */
 #define ST_SIZE_BYTE     1
 #define ST_SIZE_8BIT     1
@@ -187,7 +187,7 @@
 
         if (SDL_RWread(src, bits24, sizeof (bits24), 1) != 1)
             return 1;  /* assume that's the end of the file. */
-
+        
         /* Size is an 24-bit value. Ugh. */
         sblen = ( (bits24[0]) | (bits24[1] << 8) | (bits24[2] << 16) );
 
@@ -444,7 +444,7 @@
         return(0);
     } /* if */
 
-    _D(("VOC: Accepting data stream.\n"));
+    SNDDBG(("VOC: Accepting data stream.\n"));
     sample->actual.format = (v->size == ST_SIZE_WORD) ? AUDIO_S16LSB:AUDIO_U8;
     sample->actual.channels = v->channels;
     sample->flags = SOUND_SAMPLEFLAG_NONE;
--- a/decoders/wav.c	Mon Sep 24 15:31:03 2001 +0000
+++ b/decoders/wav.c	Mon Sep 24 15:31:25 2001 +0000
@@ -235,7 +235,7 @@
 
     sample->flags = SOUND_SAMPLEFLAG_NONE;
 
-    _D(("WAV: Accepting data stream.\n"));
+    SNDDBG(("WAV: Accepting data stream.\n"));
     return(1); /* we'll handle this data. */
 } /* WAV_open */