quartz/dsoundrender: Delegate IReferenceClock to the system clock.
commit63a6b308e91232dd55dd107595a6181c70180dd4
authorZebediah Figura <z.figura12@gmail.com>
Thu, 28 Nov 2019 23:35:40 +0000 (28 17:35 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 29 Nov 2019 07:23:32 +0000 (29 08:23 +0100)
tree05f82244b6b35a16460e268c3591b7566e8fa919
parent3f2b813da6bc5f810abdc90bee1c6000c03872e6
quartz/dsoundrender: Delegate IReferenceClock to the system clock.

For several reasons.

Firstly, the reference clock should still function when the filter is not
running.

Secondly, IDirectSoundBuffer::GetPositions() in practice returns very coarse
positions, both on Windows and on Wine. On my hardware, the resolution is
about 10ms, which, while suitable for the DirectSound renderer and probably
also any video renderers, is nevertheless actually coarser than
GetTickCount().

Thirdly, testing supports that the native DirectSound renderer returns a
timestamp from IReferenceClock::GetTime() that is more accurate than
IDirectSoundBuffer::GetPositions(). In fact, after dumping a large number of
different clock sources, I came to the conclusion that it is probably using
timeGetTime() as a source. On Wine that's identical to GetTickCount(), so we
may as well just delegate directly to the system clock.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/quartz/dsoundrender.c