changeset 82:7505dcf8d3b7

Fixes some Visual C++ 6.0 compiler complaints.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 25 Sep 2001 21:02:20 +0000
parents c047ae35d5fa
children 2b5ba7f33840
files playsound/playsound.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/playsound/playsound.c	Tue Sep 25 21:00:02 2001 +0000
+++ b/playsound/playsound.c	Tue Sep 25 21:02:20 2001 +0000
@@ -90,9 +90,9 @@
 static void audio_callback(void *userdata, Uint8 *stream, int len)
 {
     static Uint8 overflow[16384]; /* this is a hack. */
-    static Uint32 overflowBytes = 0;
+    static int overflowBytes = 0;
     Sound_Sample *sample = *((Sound_Sample **) userdata);
-    Uint32 bw = 0; /* bytes written to stream*/
+    int bw = 0; /* bytes written to stream*/
     Uint32 rc;  /* return code */
 
     if (overflowBytes > 0)
@@ -107,7 +107,7 @@
         rc = Sound_Decode(sample);
         if (rc > 0)
         {
-            if (bw + rc > len)
+            if ((bw + (int) rc) > len)
             {
                 overflowBytes = (bw + rc) - len;
                 memcpy(overflow,
@@ -140,7 +140,8 @@
 
 static void output_usage(const char *argv0)
 {
-    fprintf(stderr, "USAGE: %s <soundFile1> [soundFile2] ... [soundFileN]\n",
+    fprintf(stderr,
+            "USAGE: %s [--decoders] [soundFile1] ... [soundFileN]\n",
             argv0);
 } /* output_usage */