Module: LCKAudio | Version: 1.0 | Platforms: All
Overview
The LCK audio system provides modular audio capture through a plugin architecture. Audio sources register as modular features and feed PCM data into a mixer that produces a final stereo output for the encoder.
This page covers the three core API types. For the full interface specification, see ILCKAudioSource Interface .
ELCKAudioChannel
Enum defining audio channel types. Used as a bitmask to declare source capabilities and request capture channels.
enum ELCKAudioChannel : uint64
{
None = 0 ,
Game = 1 << 0 , // Game audio (Unreal, FMOD, Wwise)
Microphone = 1 << 1 , // Microphone input
VoiceChat = 1 << 2 , // Voice chat (Vivox)
Max = 1 << 3 // Maximum value marker
};
Value Bit Description None0 No channels Game0x1 Game audio output Microphone0x2 Microphone input VoiceChat0x4 Voice chat audio (send or receive)
FLCKAudioMix
Combines multiple ILCKAudioSource instances into a single stereo output for the encoder.
class FLCKAudioMix
{
public:
void SetTargetSampleRate ( int32 InSampleRate ) noexcept ;
void AddSource ( TWeakPtr < ILCKAudioSource > AudioSource ) noexcept ;
TArray < float > StereoMix ( TLCKAudioChannelsMask Channels );
bool StartCapture () noexcept ;
void StopCapture () noexcept ;
void EnsureMicrophoneCapture () noexcept ;
float GetVolume () const noexcept ;
};
Method Purpose SetTargetSampleRate(Hz)Set the target sample rate for resampling (typically 48000) AddSource(Source)Register an audio source with the mixer (takes TWeakPtr) StereoMix(Channels)Return interleaved stereo PCM for the requested channel mask StartCapture()Begin capture on all registered sources StopCapture()Stop capture on all registered sources EnsureMicrophoneCapture()Start microphone capture if a mic source exists but is idle GetVolume()Get the current mixed volume level (0.0-1.0)
Usage Example
FLCKAudioMix AudioMix;
// Add sources
AudioMix . AddSource (UnrealAudioSource);
AudioMix . AddSource (FMODSource);
// Set target sample rate
AudioMix . SetTargetSampleRate ( 48000 );
// Start capturing all registered sources
AudioMix . StartCapture ();
// Each frame: get mixed audio for the encoder
TArray < float > MixedPCM = AudioMix . StereoMix (Channels);
Encoder -> EncodeAudio (MixedPCM);
ILCKAudioSource
The base interface all audio plugins implement. See the full specification at ILCKAudioSource Interface .
Method Purpose StartCapture()Begin audio capture StopCapture()Stop audio capture GetVolume()Current audio level (0.0-1.0) GetSourceName()Source identifier string GetSupportedChannels()Channel capability bitmask
Audio Source Plugins
Plugin Module Game Mic VoiceChat Platform Unreal Audio LCKUnrealAudio Yes Yes No All FMOD LCKFMOD Yes No No All Wwise LCKWwise Yes No No Win64, Android Oboe (Android) LCKOboe No Yes No Android Vivox LCKVivox Yes Yes No All
ILCKAudioSource Interface Full interface specification, delegate signature, and custom source guide
Types & Structs Audio channel structs and configuration types