mirror of https://github.com/odrling/Aegisub
More correct playback position reporting.
Originally committed to SVN as r1147.
This commit is contained in:
parent
7a89405f18
commit
e52740570a
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue