Skip to main content
Module: LCKVivox | Version: 1.0 | Platforms: All

Overview

LCKVivox provides audio capture integration with Vivox, capturing both incoming voice chat audio and outgoing microphone audio for recording. It uses TAtomic volume tracking for thread-safe audio level monitoring and processes audio from multiple Vivox callback stages via EVivoxAudioCallbackSource.

Supported Channels

LCKVivox maps Vivox audio to the standard Game and Microphone channels for unified audio handling with other sources.

Requirements

LCKVivox requires a patched version of VivoxCore. The official VivoxCore plugin must be modified to add audio callback support. The LCKVivox plugin is disabled by default and will not compile without the patched VivoxCore installed.
  • VivoxCore plugin for Unreal Engine (with LCK audio callbacks patch)
  • Active Vivox account

Source Implementation

FLCKVivoxSource

The core audio source class that captures both incoming and outgoing Vivox audio:

Thread-Safe Volume Tracking

FLCKVivoxSource uses TAtomic<float> for volume values because Vivox audio callbacks arrive on Vivox’s internal audio thread, while GetVolume() may be called from the game thread. The atomic values ensure lock-free, thread-safe reads without blocking the audio pipeline.

EVivoxAudioCallbackSource

The Vivox patch exposes multiple callback stages. FLCKVivoxSource uses specific stages for game and microphone audio:
The other callback stages (CaptureAfterRead, RecvBeforeMixed, FinalBeforeAEC) are available in the patched VivoxCore but are not used by the default FLCKVivoxSource implementation.

VivoxCore Patch

LCKVivox requires custom audio callbacks that are not available in the official VivoxCore plugin. You must apply the following modifications to VivoxCore before using LCKVivox.

Files to Modify

Add after the media_codec_type enum (around line 29):
Add at the end of the IClient class (before the closing };):
Add in the private: section:
Add in the public: section:
Add after Cleanup() function:
In Initialize(), add before vx_initialize3:
Add at the end of the file:
The patch adds audio callback hooks that allow LCKVivox to capture audio data at various stages of the Vivox audio pipeline without modifying Vivox’s normal operation.

Dependencies

Automatic Integration

The plugin automatically registers itself with the LCK audio system when the VivoxCore plugin is available. No manual initialization is required.

Audio Flow

Channel Mapping

This mapping allows:
  • Voice chat to be recorded alongside game audio
  • Microphone to be captured before network transmission
  • Unified mixing with other audio sources

Configuration

Capture Channels Mask

By default, FLCKVivoxSource captures both Game and Microphone channels. You can customize which channels are captured by calling StartCapture with a TLCKAudioChannelsMask:
Use ELCKAudioChannel::Game alone when you want to record other players’ voice chat but exclude the local player’s microphone (for example, if microphone audio is already captured by another source like LCKOboe or LCKUnrealAudio).

Dual-Channel Behavior

LCKVivox captures audio at two distinct stages of the Vivox audio pipeline: Each channel maintains its own TAtomic<float> volume level for thread-safe monitoring.

Error Handling

If VivoxCore is not loaded when StartCapture() is called, it returns false and logs a warning to LogLCKVivox. The capture state remains inactive.
Call StopCapture() from the game thread for clean shutdown. The source uses a FThreadSafeCounter to track in-flight callbacks and waits up to 1 second for them to complete.

Usage with Recording

When recording with LCKVivox enabled:

Troubleshooting

  1. Verify the VivoxCore patch has been applied correctly
  2. Check that players are connected to a Vivox channel
  3. Verify SetAudioDataCallback is being called during initialization
  4. Check LogLCKVivox for errors
  1. Check TAtomic volume values via GetVolume()
  2. Verify Vivox channel volume settings in your game
  3. Ensure audio callback data contains non-zero PCM samples
  1. Verify all five VivoxCore patch files have been modified
  2. Check that VivoxCore module is listed in Build.cs dependencies
  3. Ensure EVivoxAudioCallbackSource enum is accessible

Log Category

See Also

Audio Overview

Audio system architecture

Unreal Audio

Native audio capture