From f8adccefd9183f6ae712eace9d3755e422bf1299 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 3 Sep 2009 19:27:48 +0200 Subject: fixed ape song ending --- plugins/ape/ape.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/ape/ape.c') diff --git a/plugins/ape/ape.c b/plugins/ape/ape.c index 1a24eb08..87045082 100644 --- a/plugins/ape/ape.c +++ b/plugins/ape/ape.c @@ -98,6 +98,9 @@ ape_read (char *buffer, int size) { ape_blocks_left -= nblocks; samplesdecoded += nblocks; plugin.info.readpos = samplesdecoded / (float)plugin.info.samplerate - timestart; + if (plugin.info.readpos >= timeend) { + return 0; + } return nblocks * 2 * plugin.info.channels; } -- cgit v1.2.3