diff decoders/mpglib/layer3.c @ 387:fb519e6028e3

Changed all the Sound_SetError() calls to __Sound_SetError (or BAIL*_MACRO)
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 05 Jul 2002 23:11:51 +0000
parents 7b1df7526915
children 9d0b5ec9cc26
line wrap: on
line diff
--- a/decoders/mpglib/layer3.c	Fri Jul 05 22:34:55 2002 +0000
+++ b/decoders/mpglib/layer3.c	Fri Jul 05 23:11:51 2002 +0000
@@ -347,8 +347,7 @@
            gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(3)<<3);
 
          if(gr_info->block_type == 0) {
-           Sound_SetError("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed.");
-           return 0;
+           BAIL_MACRO("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed.", 0);
          }
          /* region_count/start parameters are implicit in this case. */       
          gr_info->region1start = 36>>1;
@@ -421,8 +420,7 @@
            gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(3)<<3);
 
          if(gr_info->block_type == 0) {
-           Sound_SetError("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed.");
-           return 0;
+           BAIL_MACRO("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed.", 0);
          }
          /* region_count/start parameters are implicit in this case. */       
 /* check this again! */
@@ -956,8 +954,8 @@
   if(part2remain > 0)
     getbits(part2remain);
   else if(part2remain < 0) {
-    Sound_SetError("MPGLIB: Can't rewind stream!"); /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain);*/
-    return 1; /* -> error */
+    /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain);*/
+    BAIL_MACRO("MPGLIB: Can't rewind stream!", 1); /* -> error */
   }
   return 0;
 }
@@ -1367,8 +1365,8 @@
   if(part2remain > 0 )
     getbits(part2remain);
   else if(part2remain < 0) {
-    Sound_SetError("MPGLIB: Can't rewind stream!"); /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain); */
-    return 1; /* -> error */
+    /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain);*/
+    BAIL_MACRO("MPGLIB: Can't rewind stream!", 1); /* -> error */
   }
   return 0;
 }
@@ -1906,7 +1904,7 @@
     if(!III_get_side_info_1(&sideinfo,stereo,ms_stereo,sfreq,single))
       return -1;
 #else
-    Sound_SetError("MPGLIB: Not supported!");
+    __Sound_SetError("MPGLIB: Not supported!");
 #endif
   }
 
@@ -1927,7 +1925,7 @@
 #ifdef MPEG1
         part2bits = III_get_scale_factors_1(scalefacs[0],gr_info);
 #else
-        Sound_SetError("MPGLIB: Not supported!");
+        __Sound_SetError("MPGLIB: Not supported!");
 #endif
       }
       if(III_dequantize_sample(hybridIn[0], scalefacs[0],gr_info,sfreq,part2bits))
@@ -1942,7 +1940,7 @@
 #ifdef MPEG1
         part2bits = III_get_scale_factors_1(scalefacs[1],gr_info);
 #else
-        Sound_SetError("MPGLIB: Not supported!");
+        __Sound_SetError("MPGLIB: Not supported!");
 #endif
       }