diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2015-12-21 09:45:32 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2015-12-21 16:58:51 -0800 |
commit | 5afa68835ade9f21f9c709f791319bf9d2e35265 (patch) | |
tree | c9a427353ca228c4c4bd415d93e631e8ee0c27d5 /libmpv | |
parent | 5360baa49e630048b2454504c9a5d2ffe4e3651f (diff) |
ao_wasapi: fix delay calculation
Make sure that subtraction of performance counters is done correctly.
Follow the *exact* instructions for converting performance counter to something
comparable to the QPCposition returned by IAudioClient::GetPosition
https://msdn.microsoft.com/en-us/library/windows/desktop/dd370889%28v=vs.85%29.aspx
Also make sure that subtraction of unsigned integers is stored into a signed
integer to avoid nastiness. Also be more careful about overflow in the
conversion of the device position into number of samples.
Avoid casting mp_time_us() to a double, and use llrint to convert the
double precision delay_us back to integer for ao_read_data.
Finally, actually check the return value of ao_read_data and add a verbose
message if it is not the expected value. Unfortunately,
there is no way to tell WASAPI when this happens since the frame_count in
ReleaseBuffer must match GetBuffer.
Diffstat (limited to 'libmpv')
0 files changed, 0 insertions, 0 deletions