forked from mia/Aegisub
More correct playback position reporting.
Originally committed to SVN as r1147.
This commit is contained in:
parent
7a89405f18
commit
e52740570a
1 changed files with 3 additions and 1 deletions
|
@ -397,7 +397,9 @@ __int64 AlsaPlayer::GetEndPosition()
|
||||||
// Get current position
|
// Get current position
|
||||||
__int64 AlsaPlayer::GetCurrentPosition()
|
__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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue