Mercurial > SDL_sound_CoreAudio
comparison decoders/mpglib/common.c @ 273:e1429f96aded
Replaced exit() calls with proper error reporting.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 10 Mar 2002 19:04:46 +0000 |
parents | 9b6e82f7c853 |
children | 9e7f9e09ea0e |
comparison
equal
deleted
inserted
replaced
272:0ac181b5adc6 | 273:e1429f96aded |
---|---|
3 #include <signal.h> | 3 #include <signal.h> |
4 | 4 |
5 #include <sys/types.h> | 5 #include <sys/types.h> |
6 #include <sys/stat.h> | 6 #include <sys/stat.h> |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 | |
9 #include "SDL_sound.h" | |
10 | |
11 #define __SDL_SOUND_INTERNAL__ | |
12 #include "SDL_sound_internal.h" | |
8 | 13 |
9 #include "mpg123_sdlsound.h" | 14 #include "mpg123_sdlsound.h" |
10 | 15 |
11 struct parameter param = { 1 , 1 , 0 , 0 }; | 16 struct parameter param = { 1 , 1 , 0 , 0 }; |
12 | 17 |
63 fr->mpeg25 = 1; | 68 fr->mpeg25 = 1; |
64 } | 69 } |
65 | 70 |
66 fr->lay = 4-((newhead>>17)&3); | 71 fr->lay = 4-((newhead>>17)&3); |
67 if( ((newhead>>10)&0x3) == 0x3) { | 72 if( ((newhead>>10)&0x3) == 0x3) { |
68 fprintf(stderr,"Stream error\n"); | 73 Sound_SetError("MPGLIB: Corrupted header"); |
69 exit(1); | 74 return 0; |
70 } | 75 } |
71 if(fr->mpeg25) { | 76 if(fr->mpeg25) { |
72 fr->sampling_frequency = 6 + ((newhead>>10)&0x3); | 77 fr->sampling_frequency = 6 + ((newhead>>10)&0x3); |
73 } | 78 } |
74 else | 79 else |