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 usesTAtomic volume tracking for thread-safe audio level monitoring and processes audio from multiple Vivox callback stages via EVivoxAudioCallbackSource.
Supported Channels
| Channel | Supported | Description |
|---|---|---|
Game | Yes | Incoming voice chat audio (received before rendered) |
Microphone | Yes | Outgoing microphone audio (captured before sent) |
VoiceChat | No | Not used — Vivox audio mapped to Game/Microphone |
LCKVivox maps Vivox audio to the standard
Game and Microphone channels for unified audio handling with other sources.Requirements
- 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:| Member | Type | Description |
|---|---|---|
GameVolume | TAtomic<float> | Thread-safe volume level for incoming voice chat audio |
MicVolume | TAtomic<float> | Thread-safe volume level for outgoing microphone 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:
| Callback | Used For | LCK Channel |
|---|---|---|
CaptureBeforeSent | Local microphone audio | Microphone |
RecvBeforeRendered | Incoming voice from other players | Game |
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
1. VivoxConfig.h (+21 lines)
1. VivoxConfig.h (+21 lines)
Add after the
media_codec_type enum (around line 29):2. IClient.h (+2 lines)
2. IClient.h (+2 lines)
Add at the end of the
IClient class (before the closing };):3. ClientImpl.h (+14 lines)
3. ClientImpl.h (+14 lines)
Add in the Add in the
private: section:public: section:4. ClientImpl.cpp (+103 lines)
4. ClientImpl.cpp (+103 lines)
Add after In
Cleanup() function:Initialize(), add before vx_initialize3:5. VivoxConfig.cpp (+12 lines)
5. VivoxConfig.cpp (+12 lines)
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
| Vivox Source | LCK Channel | Description |
|---|---|---|
| Incoming voice | Game | Audio from other players in the voice channel |
| Outgoing voice | Microphone | Local player’s microphone audio |
- 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:
Dual-Channel Behavior
LCKVivox captures audio at two distinct stages of the Vivox audio pipeline:| LCK Channel | Vivox Callback | Description |
|---|---|---|
Game | RecvBeforeRendered | Mixed audio from all remote participants, captured before speaker output |
Microphone | CaptureBeforeSent | Local microphone audio after Vivox processing, captured before network transmission |
TAtomic<float> volume level for thread-safe monitoring.
Error Handling
If VivoxCore is not loaded whenStartCapture() is called, it returns false and logs a warning to LogLCKVivox. The capture state remains inactive.
Usage with Recording
When recording with LCKVivox enabled:Troubleshooting
No voice chat audio captured
No voice chat audio captured
- Verify the VivoxCore patch has been applied correctly
- Check that players are connected to a Vivox channel
- Verify
SetAudioDataCallbackis being called during initialization - Check LogLCKVivox for errors
Volume levels incorrect
Volume levels incorrect
- Check
TAtomicvolume values viaGetVolume() - Verify Vivox channel volume settings in your game
- Ensure audio callback data contains non-zero PCM samples
Plugin not compiling
Plugin not compiling
- Verify all five VivoxCore patch files have been modified
- Check that
VivoxCoremodule is listed in Build.cs dependencies - Ensure
EVivoxAudioCallbackSourceenum is accessible
Log Category
See Also
Audio Overview
Audio system architecture
Unreal Audio
Native audio capture