Viz Engine

Version 3.10 | Published April 03, 2018 ©

Timing Behavior and Delay Settings

In this timing behavior for every activated DirectSound only card can be set. The default values should work for most devices; however, differences may occur.

Latency adjustment on the DirectSound audio device

images/download/attachments/27018659/audioreference_lanten_adjust.png
All sound devices use a Ring buffer that stores data until it is sent out to the audio channels, and this ring buffer 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 6 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 ring buffer of 1 second which is split in 60 blocks. This gives an output delay of 10 milliseconds when the BlockReadForward value is 6 (see the Viz Config file’s SECTION AUDIO_CONFIG).

Note: An audio card which is not synchronized will always run 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/27018659/audioreference_matrox_input_output.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 ring buffer 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 will move away from the playout position. If it is faster, SyncTargetPosition will move 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 will 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 2 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.