--- orig-audio_read.c	Fri Feb 14 18:01:12 2003
+++ audio_read.c	Fri Feb 28 15:39:08 2003
@@ -37,11 +37,12 @@
   else
     samples_read = samples_to_read;
   if ((samples_read =
        fread (sample_buffer, sizeof (short), (int) samples_read,
 	      musicin)) == 0)
-    fprintf (stderr, "Hit end of audio data\n");
+    if (glopts.verbosity > 1)
+      fprintf (stderr, "Hit end of audio data\n");
   /*
      Samples are big-endian. If this is a little-endian machine
      we must swap
    */
   if (NativeByteOrder == order_unknown) {
@@ -49,11 +50,11 @@
     if (NativeByteOrder == order_unknown) {
       fprintf (stderr, "byte order not determined\n");
       exit (1);
     }
   }
-  if (NativeByteOrder != order_littleEndian || (glopts.byteswap == TRUE))
+  if ((NativeByteOrder != order_littleEndian) ^ (glopts.byteswap == TRUE))
     SwapBytesInWords (sample_buffer, samples_read);
 
 #ifdef NCPATCH
   if (num_samples != MAX_U_32_NUM)
     samples_to_read -= samples_read;
@@ -280,30 +281,35 @@
   /*************************** STDIN ********************************/
   /* check if we're reading from stdin. Assume it's a raw PCM file. */
   /* Of course, you could be piping a WAV file into stdin. Not done in this code */
   /* this code is probably very dodgy and was written to suit my needs. MFC Dec 99 */
   if ((strcmp (inPath, "/dev/stdin") == 0)) {
-    fprintf (stderr, "Reading from stdin\n");
-    fprintf (stderr, "Remember to set samplerate with '-s'.\n");
+    if (glopts.verbosity > 1) {
+      fprintf (stderr, "Reading from stdin\n");
+      fprintf (stderr, "Remember to set samplerate with '-s'.\n");
+    }
     *num_samples = MAX_U_32_NUM;	/* huge sound file */
     return;
   }
 
   /****************************  AIFF ********************************/
   if ((soundPosition = aiff_read_headers (musicin, &pcm_aiff_data)) != -1) {
-    fprintf (stderr, ">>> Using Audio IFF sound file headers\n");
+    if (glopts.verbosity > 1)
+      fprintf (stderr, ">>> Using Audio IFF sound file headers\n");
     aiff_check (inPath, &pcm_aiff_data, &info->version);
     if (fseek (musicin, soundPosition, SEEK_SET) != 0) {
       fprintf (stderr, "Could not seek to PCM sound data in \"%s\".\n",
 	       inPath);
       exit (1);
     }
-    fprintf (stderr, "Parsing AIFF audio file \n");
+    if (glopts.verbosity > 1)
+      fprintf (stderr, "Parsing AIFF audio file \n");
     info->sampling_frequency =
       SmpFrqIndex ((long) pcm_aiff_data.sampleRate, &info->version);
-    fprintf (stderr, ">>> %f Hz sampling frequency selected\n",
-	     pcm_aiff_data.sampleRate);
+    if (glopts.verbosity > 1)
+      fprintf (stderr, ">>> %f Hz sampling frequency selected\n",
+	       pcm_aiff_data.sampleRate);
 
     /* Determine number of samples in sound file */
     *num_samples = pcm_aiff_data.numChannels * pcm_aiff_data.numSampleFrames;
 
     if (pcm_aiff_data.numChannels == 1) {
@@ -331,11 +337,12 @@
   fseek (musicin, 0, SEEK_SET);
   fread (wave_header_buffer, 1, 40, musicin);
 
   if (wave_header_buffer[8] == 'W' && wave_header_buffer[9] == 'A'
       && wave_header_buffer[10] == 'V' && wave_header_buffer[11] == 'E') {
-    fprintf (stderr, "Parsing Wave File Header\n");
+    if (glopts.verbosity > 1)
+      fprintf (stderr, "Parsing Wave File Header\n");
     if (NativeByteOrder == order_unknown) {
       NativeByteOrder = DetermineByteOrder ();
       if (NativeByteOrder == order_unknown) {
 	fprintf (stderr, "byte order not determined\n");
 	exit (1);
@@ -355,11 +362,12 @@
     case 48000:
     case 32000:
     case 24000:
     case 22050:
     case 16000:
-      fprintf (stderr, ">>> %ld Hz sampling freq selected\n", samplerate);
+      if (glopts.verbosity > 1)
+	fprintf (stderr, ">>> %ld Hz sampling freq selected\n", samplerate);
       break;
     default:
       /* Unknown Unsupported Frequency */
       fprintf (stderr, ">>> Unknown samp freq %ld Hz in Wave Header\n",
 	       samplerate);
@@ -372,17 +380,19 @@
       fprintf (stderr, "invalid sample rate\n");
       exit (0);
     }
 
     if ((long) wave_header_buffer[22] == 1) {
-      fprintf (stderr, ">>> Input Wave File is Mono\n");
+      if (glopts.verbosity > 1)
+	fprintf (stderr, ">>> Input Wave File is Mono\n");
       wave_header_stereo = 0;
       info->mode = MPG_MD_MONO;
       info->mode_ext = 0;
     }
     if ((long) wave_header_buffer[22] == 2) {
-      fprintf (stderr, ">>> Input Wave File is Stereo\n");
+      if (glopts.verbosity > 1)
+	fprintf (stderr, ">>> Input Wave File is Stereo\n");
       wave_header_stereo = 1;
     }
     if ((long) wave_header_buffer[32] == 1) {
       fprintf (stderr, ">>> Input Wave File is 8 Bit\n");
       wave_header_16bit = 0;
--- orig-toolame.c	Sat Feb 15 01:12:59 2003
+++ toolame.c	Fri Feb 28 15:40:02 2003
@@ -36,11 +36,11 @@
   glopts.downmix = FALSE;
   glopts.byteswap = FALSE;
   glopts.channelswap = FALSE;
   glopts.vbr = FALSE;
   glopts.vbrlevel = 0;
-  glopts.verbosity = 2;
+  glopts.verbosity = 0;
 }
 
 /************************************************************************
 *
 * main
@@ -336,23 +336,25 @@
     for (i = 1; i < 15; i++)
       fprintf (stdout, "%4i ", vbrstats[i]);
     fprintf (stdout, "\n");
   }
 
-  fprintf (stderr,
-	   "Avg slots/frame = %.3f; b/smp = %.2f; bitrate = %.3f kbps\n",
-	   (FLOAT) sentBits / (frameNum * 8),
-	   (FLOAT) sentBits / (frameNum * 1152),
-	   (FLOAT) sentBits / (frameNum * 1152) *
-	   s_freq[info.version][info.sampling_frequency]);
+  if (glopts.verbosity > 1)
+    fprintf (stderr,
+	     "Avg slots/frame = %.3f; b/smp = %.2f; bitrate = %.3f kbps\n",
+	     (FLOAT) sentBits / (frameNum * 8),
+	     (FLOAT) sentBits / (frameNum * 1152),
+	     (FLOAT) sentBits / (frameNum * 1152) *
+	     s_freq[info.version][info.sampling_frequency]);
 
   if (fclose (musicin) != 0) {
     fprintf (stderr, "Could not close \"%s\".\n", original_file_name);
     exit (2);
   }
 
-  fprintf (stderr, "\nDone\n");
+  if (glopts.verbosity > 1)
+    fprintf (stderr, "\nDone\n");
   exit (0);
 }
 
 /************************************************************************
 *
