mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
seeking was broken in Mpg123Decoder
--HG-- branch : minor
This commit is contained in:
@@ -163,12 +163,12 @@ namespace lullaby
|
||||
|
||||
bool Mpg123Decoder::seek(float s)
|
||||
{
|
||||
off_t offset = mpg123_timeframe(handle, s);
|
||||
off_t offset = s * sampleRate;
|
||||
|
||||
if(offset < 0)
|
||||
return false;
|
||||
|
||||
if(mpg123_feedseek(handle, 0, SEEK_SET, &offset) >= 0)
|
||||
if(mpg123_feedseek(handle, offset, SEEK_SET, &offset) >= 0)
|
||||
{
|
||||
data_offset = offset;
|
||||
eof = false;
|
||||
|
||||
Reference in New Issue
Block a user