Source

love / src / modules / sound / lullaby / Mpg123Decoder.cpp

Diff from to

File src/modules/sound/lullaby/Mpg123Decoder.cpp

 
 	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;