if not synthing, the buffer may have data used. mad->Timer is the time of the beginning of this MP3 frame; make sure the "skip data in the buffer" logic always works by putting the buffer back to the beginning of the MP3 frame

This commit is contained in:
Glenn Maynard
2006-12-09 08:48:28 +00:00
parent 1ba68d8469
commit ba58784e68
+7
View File
@@ -896,7 +896,14 @@ int RageSoundReader_MP3::SetPosition_hard( int iFrame )
if( mad_timer_compare(desired, next_frame_timer) < 0 )
{
if( !synthed )
{
synth_output();
}
else
{
mad->outleft += mad->outpos;
mad->outpos = 0;
}
/* We just synthed data starting at mad->Timer, containing the desired offset.
* Skip (desired - mad->Timer) worth of frames in the output to line up. */