Sound effect playback is delayed when playing movie

If you connect an amplifier board to the analog audio output of Apalis T30 + Ixora and play a movie, playback of the sound effect will be delayed.

Attach the recorded file.

In the first file, the movie is not playing. If you change the setting by volume setting, sound effects will be played instantly.

In the second file, the movie is playing in the background. If you change the setting by volume setting, the sound effect will be delayed and played.

Is there a way to deal with something?

link text

Dear @kyas

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:

[HKLM\Software\NVIDIA Corporation\NVDSHOW]
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.

Best Regards

Thank you for your quick response.

When I set the registry that I taught, sound effects are played without delay even during movie playback.
After this, I will look a little about the influence of setting “maxBufferSize” to a small value.

Thank you very much!