More correct playback position reporting.

Originally committed to SVN as r1147.
This commit is contained in:
Niels Martin Hansen 2007-04-26 20:17:20 +00:00
parent 7a89405f18
commit e52740570a

View file

@ -397,7 +397,9 @@ __int64 AlsaPlayer::GetEndPosition()
// Get current position
__int64 AlsaPlayer::GetCurrentPosition()
{
return cur_frame - bufsize; // FIXME
snd_pcm_sframes_t delay = 0;
snd_pcm_delay(pcm_handle, &delay); // don't bother catching errors here
return cur_frame - delay;
}