Mercurial > SDL_sound_CoreAudio
comparison decoders/voc.c @ 480:00b61987b555
Fixed logic bug in .voc decoder that caused crash at open time.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 12 Nov 2004 08:21:04 +0000 |
parents | 3e705c9180e5 |
children | 2df1f5c62d38 |
comparison
equal
deleted
inserted
replaced
479:35dfa9d9782e | 480:00b61987b555 |
---|---|
229 if ((v->rate != -1) && (uc != v->rate)) | 229 if ((v->rate != -1) && (uc != v->rate)) |
230 BAIL_MACRO("VOC sample rate codes differ", 0); | 230 BAIL_MACRO("VOC sample rate codes differ", 0); |
231 | 231 |
232 v->rate = uc; | 232 v->rate = uc; |
233 sample->actual.rate = 1000000.0/(256 - v->rate); | 233 sample->actual.rate = 1000000.0/(256 - v->rate); |
234 sample->actual.channels = 1; | |
234 v->channels = 1; | 235 v->channels = 1; |
235 } /* if */ | 236 } /* if */ |
236 | 237 |
237 if (!voc_readbytes(src, v, &uc, sizeof (uc))) | 238 if (!voc_readbytes(src, v, &uc, sizeof (uc))) |
238 return(0); | 239 return(0); |