All audio data is routed through a FIFO buffer before bing played back. A large buffer assures that no underruns occur (all audio is played properly) even under heavy load. The drawback is a long latency time when mixing multiple audio sources.
This buffer size is controlled by a registry key in the audio device driver:
"maxBufferSize" = dword:0x8000 ; Default size is 32'768 bytes
In a typical application for T30/WEC7 a
maxBufferSize of 0x1000 is fully sufficient. This increases the chance of underruns, but decreases the latency to a level where it cannot be recognized anymore (by me).
To achieve a synchronous playback of audio and video, the following DirectShow setting needs to be adjusted:
Nvdshow_AVSync_Offset=dword:400 ; delay in milliseconds
400ms is the default setting, if the registry key is not present. For a
maxBufferSize of 0x1000, I reduced the
Nvdshow_AVSync_Offset to 100ms.
The system sounds should den be played without significant delay.