Mercurial > SDL_sound_CoreAudio
diff decoders/mpglib/layer3.c @ 274:9e7f9e09ea0e
Removed fprintf() calls. Replaced with SNDDBG() and Sound_SetError() calls.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 10 Mar 2002 19:15:25 +0000 |
parents | 9b6e82f7c853 |
children | 52b9f37998db |
line wrap: on
line diff
--- a/decoders/mpglib/layer3.c Sun Mar 10 19:04:46 2002 +0000 +++ b/decoders/mpglib/layer3.c Sun Mar 10 19:15:25 2002 +0000 @@ -6,6 +6,12 @@ */ #include <stdlib.h> + +#include "SDL_sound.h" + +#define __SDL_SOUND_INTERNAL__ +#include "SDL_sound_internal.h" + #include "mpg123_sdlsound.h" #include "mpglib_sdlsound.h" #include "huffman.h" @@ -320,7 +326,7 @@ gr_info->part2_3_length = getbits(12); gr_info->big_values = getbits_fast(9); if(gr_info->big_values > 288) { - fprintf(stderr,"big_values too large!\n"); + SNDDBG("MPGLIB: big_values too large!\n"); gr_info->big_values = 288; } gr_info->pow2gain = gainpow2+256 - getbits_fast(8) + powdiff; @@ -344,7 +350,7 @@ gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(3)<<3); if(gr_info->block_type == 0) { - fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n"); + Sound_SetError("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed."); return 0; } /* region_count/start parameters are implicit in this case. */ @@ -394,7 +400,7 @@ gr_info->part2_3_length = getbits(12); gr_info->big_values = getbits_fast(9); if(gr_info->big_values > 288) { - fprintf(stderr,"big_values too large!\n"); + SNDDBG("MPGLIB: big_values too large!\n"); gr_info->big_values = 288; } gr_info->pow2gain = gainpow2+256 - getbits_fast(8) + powdiff; @@ -418,7 +424,7 @@ gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(3)<<3); if(gr_info->block_type == 0) { - fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n"); + Sound_SetError("MPGLIB: Blocktype == 0 and window-switching == 1 not allowed."); return 0; } /* region_count/start parameters are implicit in this case. */ @@ -953,7 +959,7 @@ if(part2remain > 0) getbits(part2remain); else if(part2remain < 0) { - fprintf(stderr,"mpg123: Can't rewind stream by %d bits!\n",-part2remain); + Sound_SetError("MPGLIB: Can't rewind stream!"); /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain);*/ return 1; /* -> error */ } return 0; @@ -1364,7 +1370,7 @@ if(part2remain > 0 ) getbits(part2remain); else if(part2remain < 0) { - fprintf(stderr,"mpg123_ms: Can't rewind stream by %d bits!\n",-part2remain); + Sound_SetError("MPGLIB: Can't rewind stream!"); /* !!! FIXME: Need formatting: by %d bits!\n",-part2remain); */ return 1; /* -> error */ } return 0; @@ -1902,7 +1908,7 @@ if(!III_get_side_info_1(&sideinfo,stereo,ms_stereo,sfreq,single)) return -1; #else - fprintf(stderr,"Not supported\n"); + Sound_SetError("MPGLIB: Not supported!"); #endif } @@ -1923,7 +1929,7 @@ #ifdef MPEG1 part2bits = III_get_scale_factors_1(scalefacs[0],gr_info); #else - fprintf(stderr,"Not supported\n"); + Sound_SetError("MPGLIB: Not supported!"); #endif } if(III_dequantize_sample(hybridIn[0], scalefacs[0],gr_info,sfreq,part2bits)) @@ -1938,7 +1944,7 @@ #ifdef MPEG1 part2bits = III_get_scale_factors_1(scalefacs[1],gr_info); #else - fprintf(stderr,"Not supported\n"); + Sound_SetError("MPGLIB: Not supported!"); #endif }