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:
@@ -896,7 +896,14 @@ int RageSoundReader_MP3::SetPosition_hard( int iFrame )
|
|||||||
if( mad_timer_compare(desired, next_frame_timer) < 0 )
|
if( mad_timer_compare(desired, next_frame_timer) < 0 )
|
||||||
{
|
{
|
||||||
if( !synthed )
|
if( !synthed )
|
||||||
|
{
|
||||||
synth_output();
|
synth_output();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mad->outleft += mad->outpos;
|
||||||
|
mad->outpos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* We just synthed data starting at mad->Timer, containing the desired offset.
|
/* 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. */
|
* Skip (desired - mad->Timer) worth of frames in the output to line up. */
|
||||||
|
|||||||
Reference in New Issue
Block a user