comparison decoders/mpglib/interface.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 e1429f96aded
children 52b9f37998db
comparison
equal deleted inserted replaced
273:e1429f96aded 274:9e7f9e09ea0e
55 { 55 {
56 struct buf *nbuf; 56 struct buf *nbuf;
57 57
58 nbuf = malloc( sizeof(struct buf) ); 58 nbuf = malloc( sizeof(struct buf) );
59 if(!nbuf) { 59 if(!nbuf) {
60 fprintf(stderr,"Out of memory!\n"); 60 Sound_SetError("MPGLIB: Out of memory!");
61 return NULL; 61 return NULL;
62 } 62 }
63 nbuf->pnt = malloc(size); 63 nbuf->pnt = malloc(size);
64 if(!nbuf->pnt) { 64 if(!nbuf->pnt) {
65 free(nbuf); 65 free(nbuf);
159 int len; 159 int len;
160 160
161 gmp = mp; 161 gmp = mp;
162 162
163 if(osize < 4608) { 163 if(osize < 4608) {
164 fprintf(stderr,"To less out space\n"); 164 Sound_SetError("MPGLIB: Not enough output space for decoding!");
165 return MP3_ERR; 165 return MP3_ERR;
166 } 166 }
167 167
168 if(in) { 168 if(in) {
169 if(addbuf(mp,in,isize) == NULL) { 169 if(addbuf(mp,in,isize) == NULL) {
235 235
236 int set_pointer(long backstep) 236 int set_pointer(long backstep)
237 { 237 {
238 unsigned char *bsbufold; 238 unsigned char *bsbufold;
239 if(gmp->fsizeold < 0 && backstep > 0) { 239 if(gmp->fsizeold < 0 && backstep > 0) {
240 fprintf(stderr,"Can't step back %ld!\n",backstep); 240 Sound_SetError("MPGLIB: Can't step back!"); /* FIXME: need formatting: %ld!\n",backstep); */
241 return MP3_ERR; 241 return MP3_ERR;
242 } 242 }
243 bsbufold = gmp->bsspace[gmp->bsnum] + 512; 243 bsbufold = gmp->bsspace[gmp->bsnum] + 512;
244 wordpointer -= backstep; 244 wordpointer -= backstep;
245 if (backstep) 245 if (backstep)