diff options
Diffstat (limited to 'lib/rbcodec/codecs/ape.c')
-rw-r--r-- | lib/rbcodec/codecs/ape.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/rbcodec/codecs/ape.c b/lib/rbcodec/codecs/ape.c index 0adc793ade..937af1945f 100644 --- a/lib/rbcodec/codecs/ape.c +++ b/lib/rbcodec/codecs/ape.c | |||
@@ -218,7 +218,7 @@ enum codec_status codec_run(void) | |||
218 | 218 | ||
219 | ape_resume(&ape_ctx, resume_offset, | 219 | ape_resume(&ape_ctx, resume_offset, |
220 | ¤tframe, &samplesdone, &samplestoskip, &firstbyte); | 220 | ¤tframe, &samplesdone, &samplestoskip, &firstbyte); |
221 | elapsedtime = (samplesdone*10)/(ape_ctx.samplerate/100); | 221 | elapsedtime = samplesdone*1000LL/ape_ctx.samplerate; |
222 | } | 222 | } |
223 | else { | 223 | else { |
224 | currentframe = 0; | 224 | currentframe = 0; |
@@ -285,8 +285,7 @@ frame_start: | |||
285 | inbuffer = ci->request_buffer(&bytesleft, | 285 | inbuffer = ci->request_buffer(&bytesleft, |
286 | INPUT_CHUNKSIZE); | 286 | INPUT_CHUNKSIZE); |
287 | 287 | ||
288 | elapsedtime = (samplesdone*10)/ | 288 | elapsedtime = samplesdone*1000LL/ape_ctx.samplerate; |
289 | (ape_ctx.samplerate/100); | ||
290 | ci->set_elapsed(elapsedtime); | 289 | ci->set_elapsed(elapsedtime); |
291 | ci->seek_complete(); | 290 | ci->seek_complete(); |
292 | action = CODEC_ACTION_NULL; | 291 | action = CODEC_ACTION_NULL; |
@@ -330,7 +329,7 @@ frame_start: | |||
330 | 329 | ||
331 | if (!samplestoskip) { | 330 | if (!samplestoskip) { |
332 | /* Update the elapsed-time indicator */ | 331 | /* Update the elapsed-time indicator */ |
333 | elapsedtime = (samplesdone*10)/(ape_ctx.samplerate/100); | 332 | elapsedtime = samplesdone*1000LL/ape_ctx.samplerate; |
334 | ci->set_elapsed(elapsedtime); | 333 | ci->set_elapsed(elapsedtime); |
335 | } | 334 | } |
336 | 335 | ||