Mercurial > SDL_sound_CoreAudio
comparison decoders/mpglib.c @ 477:3e705c9180e5
Fixed binary compatibility, added Sound_GetDuration().
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 12 May 2004 02:15:00 +0000 |
parents | c66080364dff |
children | 006e3d6cd2fe |
comparison
equal
deleted
inserted
replaced
475:f0b8865577db | 477:3e705c9180e5 |
---|---|
195 total_byte_size = SDL_RWseek(internal->rw,0, SEEK_END); | 195 total_byte_size = SDL_RWseek(internal->rw,0, SEEK_END); |
196 } | 196 } |
197 if (SDL_RWseek(internal->rw, pos, SEEK_SET) != pos) { | 197 if (SDL_RWseek(internal->rw, pos, SEEK_SET) != pos) { |
198 BAIL_MACRO("MPGLIB: Cannot go back to save spot in file.", 0); | 198 BAIL_MACRO("MPGLIB: Cannot go back to save spot in file.", 0); |
199 } | 199 } |
200 sample->total_time = total_byte_size / mpg->mp.fr.bitrate * 8.0; | 200 internal->total_time = total_byte_size / mpg->mp.fr.bitrate * 8.0; |
201 sample->total_time += (total_byte_size % mpg->mp.fr.bitrate) * 8.0 | 201 internal->total_time += (total_byte_size % mpg->mp.fr.bitrate) * 8.0 |
202 / mpg->mp.fr.bitrate; | 202 / mpg->mp.fr.bitrate; |
203 } | 203 } |
204 | 204 |
205 return(1); /* we'll handle this data. */ | 205 return(1); /* we'll handle this data. */ |
206 } /* MPGLIB_open */ | 206 } /* MPGLIB_open */ |