DescriptionFix WASAPI restriction to be based on period size; fixes Win10.
The code was forcing the output buffer size to be an even divisor
of endpoint buffer size; in seemingly 90%+ of cases this worked
prior to Windows 10. With Windows 10, the device period is no
longer an even divisor of the endpoint buffer size; e.g. my
local machine has a period of 512 and a endpoint buffer of 1126.
In retrospect this restriction seems incorrect; instead it seems
like we just want to ensure that the buffer size is an even divisor
of the device period (which ultimately determines the callback
schedule). I've changed the code to log a warning when this is not
the case, as things will still work, we'll just get glitches. The
log will help us identify users who file bug reports.
The code was also looping over the available end point buffer size,
which seems incorrect, we should fulfill only one period at a time to
avoid shared-memory induced glitches; this was added to fix
http://crbug.com/170498
BUG=516196
TEST=Windows 10 audio works on two devices, Windows 7 works fine,
traces show that callbacks are regular in all cases. Confirmed that
http://crbug.com/170498 is not regressed on X-Fi.
Committed: https://crrev.com/a7be0758c5f97679d0aed6b7f8c1f395d0d62d5c
Cr-Commit-Position: refs/heads/master@{#342334}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|