mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 494116 - Use system audio timer for a/v sync on Windows. r=chris.double, sr=roc
This commit is contained in:
parent
5ffad30282
commit
2cc8fbe2b4
@ -242,10 +242,13 @@ float nsAudioStream::GetPosition()
|
||||
if (!mAudioHandle)
|
||||
return -1.0;
|
||||
|
||||
sa_position_t positionType = SA_POSITION_WRITE_SOFTWARE;
|
||||
#if defined(XP_WIN)
|
||||
positionType = SA_POSITION_WRITE_HARDWARE;
|
||||
#endif
|
||||
PRInt64 position = 0;
|
||||
if (sa_stream_get_position(static_cast<sa_stream_t*>(mAudioHandle),
|
||||
SA_POSITION_WRITE_SOFTWARE,
|
||||
&position) == SA_SUCCESS) {
|
||||
positionType, &position) == SA_SUCCESS) {
|
||||
return (position / float(mRate) / mChannels / sizeof(short));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user