Viz Engine Administrator Guide

Version 5.0 | Published December 20, 2022 ©

Timing Behavior and Delay Settings

Timing behavior can only be set for each activated DirectSound. The default values should work for most devices; however, differences may occur between devices.

Latency Adjustment on the DirectSound Audio Device

images/download/attachments/50615908/ar_ladjust.png
All sound devices use a ringbuffer that stores data until it is sent out to the audio channels, and this ringbuffer is organized in blocks of data. All sound hardware defines a distance in blocks (or bytes) that needs to be maintained. For almost all devices on the market a distance of six blocks is sufficient to have a clean output without artifacts.

Tip: Try to decrease the Block Read Forward value down to 3 to accomplish less delay for the output. Viz Engine creates a ringbuffer of one second which is split in 60 blocks. This gives an output delay of ten milliseconds when the BlockReadForward value is 6 (see the Viz Config file’s SECTION AUDIO_CONFIG).

Note: An audio card which is not synchronized always runs faster or than a synchronized video or audio card. There is a mechanism needed to keep all audio cards synchronized with each other. The mechanism, shown below, is used by Viz Engine to fulfill this condition:

images/download/attachments/50615908/ar_matrox_io.png
After mixing the packages received from the Matrox board, the blocks of audio data are moved to the Matrox output buffer. This buffer is organized as a ringbuffer and holds one second of data and this is the maximum delay that can be achieved with the described mechanism.

The SyncTargetPosition parameter, set in SECTION AUDIO_CONFIG, defines the position relative to the playout position of the Matrox board where the audio data for the direct sound cards are branched. If the card is running slower than the reference card, the synchronized position moves away from the playout position. If it is faster, SyncTargetPosition moves to the playout position. The SyncTargetWindowSize parameter defines the border, when Viz Engine starts to re-sample the DirectSound data to bring SyncTargetPosition back in place. The predefined value of 250 samples is a good compromise between performance and quality. If a cheap audio card is used and small artifacts can be heard, try to increase this value. Good ranges are from 250 up to 600.

SyncTargetPosition is used to synchronize the different audio cards to each other. Every audio card shows a specific delay behavior. Increase or decrease this value if one card is faster than the other. If the value is too small, artifacts occur; however, most audio cards work fine with the predefined values. SyncTargetPosition and SyncTargetWindowsSize are configurable settings that can be set separately for every activated audio card.

Channel Device and Channel Track settings

In Viz Engine, it is possible to combine two or more devices for playout of the Viz Engine’s internal audio channels. Note that Viz Engine internally can use up to 16 channels. On many professional multichannel cards the channels are organized in virtual devices with two channels. A good example is the following configuration:

Available2 = M-Audio Delta 66 1+2
Available3 = M-Audio Delta 66 3+4

In Viz Engine it is possible to combine these two devices and create a quad speaker configuration as shown below:

VIZChannelDevice0 = M-Audio Delta 66 1+2
VIZChannelDevice1 = M-Audio Delta 66 1+2
VIZChannelDevice2 = M-Audio Delta 66 3+4
VIZChannelDevice3 = M-Audio Delta 66 3+4
VIZChannelDevice4 = Realtek HD Audio output
VIZChannelDevice5 = Realtek HD Audio output
VIZChannelDevice6 = Realtek HD Audio output
VIZChannelDevice7 = Realtek HD Audio output
VIZChannelDevice8 = none
VIZChannelDevice9 = none
VIZChannelDevice10 = none
VIZChannelDevice11 = none
VIZChannelDevice12 = none
VIZChannelDevice13 = none
VIZChannelDevice14 = none
VIZChannelDevice15 = none
VIZChannelTrack0 = 0
VIZChannelTrack1 = 1
VIZChannelTrack2 = 0
VIZChannelTrack3 = 1
VIZChannelTrack4 = 4
VIZChannelTrack5 = 5
VIZChannelTrack6 = 6
VIZChannelTrack7 = 7
VIZChannelTrack8 = 0
VIZChannelTrack9 = 0
VIZChannelTrack10 = 0
VIZChannelTrack11 = 0
VIZChannelTrack12 = 0
VIZChannelTrack13 = 0
VIZChannelTrack14 = 0
VIZChannelTrack15 = 0

See Also

  • The Viz Config file, SECTION AUDIO_CONFIG.