What Problem Does This Solve?
LCK needs to capture audio from multiple sources:- Game audio (Unreal, FMOD, Wwise)
- Microphone input
- Voice chat (Vivox)
ILCKAudioSource provides a unified interface so all audio plugins work the same way. This lets you:
- Mix multiple audio sources together
- Switch audio middleware without changing code
- Create custom audio sources
- Route audio to the encoder
When to Use This
Read this if:- Building a custom audio source plugin
- Integrating new audio middleware
- Understanding how audio flows through LCK
- Debugging audio capture issues
Critical: Single Delegate Warning
Correct Usage ✅
Incorrect Usage ❌
Interface Definition
Audio Delegate Signature
Parameters Explained
Audio Data Format
Example PCM data (stereo):
Supported Channels
Each audio source declares which channels it can capture:
Check supported channels:
Finding Audio Sources
Audio sources are discovered via Unreal’s modular features system:Audio Mixing with FLCKAudioMix
FLCKAudioMix combines multiple audio sources into a single stereo output:
Usage Example
Implementing a Custom Audio Source
Step 1: Create Source Class
Step 2: Fire Audio Delegate
When you have audio data, fire the delegate:Step 3: Register as Modular Feature
Thread Safety
Thread-Safe Audio Callback
When to Use Each Approach
Complete Example: Custom Microphone Source
Debugging Audio Sources
List All Sources
Monitor Audio Levels
Key Takeaways
Single delegate — Use BindLambda, not AddLambda
Modular features — Audio sources register at module startup
Channel bitmask — Sources declare what they support (Game, Mic, VoiceChat)
Thread safety — Audio callbacks may come from any thread
Audio format — 32-bit float, interleaved, -1.0 to 1.0 range
FLCKAudioMix — Combines multiple sources into one output
Related
- Architecture — How audio flows through the system
- Delegates Reference — FOnRenderAudioDelegate details
- Module Loading — Audio plugin priorities
- Best Practices — Threading and performance tips