Skip to content

Commit

Permalink
Document the Windows audio buffer size as 10 ms
Browse files Browse the repository at this point in the history
After some double checking it turns out 20 ms is wrong - the buffer size
that the Windows Audio Engine uses internally is 10 ms (this is the size
of the buffer that APOs are called with, and it's also the "packet" size
it uses with WaveRT hardware).

20 ms may have been correct at some point in the distant past (Windows 7
maybe?), but it's clearly not anymore.
  • Loading branch information
dechamps committed Jun 15, 2024
1 parent 3b9b539 commit b2e16cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ pipeline. In particular, choice of backend can affect:
backends.

**Note:** the internal buffer size of the shared Windows audio pipeline has been
observed to be 20 ms. This means that only exclusive backends (i.e. WASAPI
Exclusive, WDM-KS) can achieve an actual latency below 20 ms.
observed to be 10 ms. This means that only exclusive backends (i.e. WASAPI
Exclusive, WDM-KS) can achieve an actual latency below 10 ms.

**Note:** In addition to APOs, hardware devices can also implement additional
audio processing at a low level in the audio driver, or baked into the hardware
Expand Down Expand Up @@ -99,7 +99,7 @@ the fact that MME appears to [behave very poorly][issue30] with small buffer
sizes.

Latency numbers reported by MME do not seem to take the Windows audio pipeline
into account. This means the reported latency is underestimated by at least 20
into account. This means the reported latency is underestimated by at least 10
ms, if not more.

The MME backend exposes "virtual" devices called *"Microsoft Sound Mapper -
Expand Down
3 changes: 0 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ It depends on the [backend][backends]:
- The default backend, **DirectSound**, as well as **MME**, are blind to most
sources of latency (including the Windows audio pipeline itself), and can
therefore grossly underestimate the actual latency.
- For example, both have been observed to report latencies below 20 ms, which
is not technically possible because that's the buffer size of the Windows
audio pipeline itself.
- The **WASAPI** and **WDM-KS** backends have been observed to report more
plausible latency numbers.

Expand Down

0 comments on commit b2e16cc

Please sign in to comment.