diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-26 21:11:20 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-26 21:11:20 +0200 |
commit | da73728c644d75abd8773811fca7301627dec6ea (patch) | |
tree | b7e8ba2b4083095057f7e07988cf97b220167c18 /plugins | |
parent | f3b7cac4b4ea529b79ca6605a6fe8bec215568d3 (diff) |
fixed flac seeking regression
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/flac/flac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c index 7a909792..ad6aab10 100644 --- a/plugins/flac/flac.c +++ b/plugins/flac/flac.c @@ -34,8 +34,6 @@ static FLAC__StreamDecoder *decoder = 0; #define BUFFERSIZE 100000 static char buffer[BUFFERSIZE]; // this buffer always has int32 samples static int remaining; // bytes remaining in buffer from last read -static float timestart; -static float timeend; static int startsample; static int endsample; static int currentsample; @@ -274,7 +272,7 @@ cflac_seek_sample (int sample) { } remaining = 0; currentsample = sample; - plugin.info.readpos = (float)sample / plugin.info.samplerate - timestart; + plugin.info.readpos = (float)(sample - startsample)/ plugin.info.samplerate; return 0; } |