mad->Timer is the beginning of the frame; advance by outpos to find the current source frame

This commit is contained in:
Glenn Maynard
2006-11-29 20:56:32 +00:00
parent bf6da7d8b4
commit 0bd9c4e032
+3
View File
@@ -1003,6 +1003,9 @@ int RageSoundReader_MP3::GetNextSourceFrame() const
{
mad_timer_t now( mad->Timer );
mad_timer_multiply( &now, mad->Frame.header.samplerate );
int iFrame = mad->outpos / (sizeof(int16_t) * this->Channels);
now.seconds += iFrame;
return now.seconds;
}