Module: LCKFMOD | Version: 1.0 | Platforms: All
Overview
LCKFMOD captures game audio from the FMOD Studio master bus using a non-destructive DSP callback. It provides game audio only; pair it with LCKUnrealAudio or LCKOboe for microphone capture.
Supported Channels
| Channel | Supported | Description |
|---|
Game | Yes | FMOD Studio master bus output |
Microphone | No | Use LCKUnrealAudio or LCKOboe |
VoiceChat | No | Use LCKVivox |
FLCKFMODSource
Audio source class that captures FMOD master bus output via a DSP attached at FMOD_CHANNELCONTROL_DSP_TAIL. Implements ILCKFeatureInstance.
class FLCKFMODSource : public ILCKFeatureInstance
{
public:
// ILCKFeatureInstance interface
virtual bool StartCapture() noexcept override;
virtual bool StartCapture(TLCKAudioChannelsMask Channels) noexcept override;
virtual void StopCapture() noexcept override;
virtual float GetVolume() const noexcept override;
virtual const FString& GetSourceName() const noexcept override;
// FMOD-specific
int32 Samplerate = 48000;
protected:
TLCKAudioChannelsMask SupportedChannels = ELCKAudioChannel::Game;
};
ILCKFeatureInstance Methods
| Method | Behavior |
|---|
StartCapture() | Attaches DSP to the FMOD master bus and begins capture |
StartCapture(Channels) | Begins capture if Game is in the requested channel mask |
StopCapture() | Detaches DSP and stops capture |
GetVolume() | Returns current RMS volume of captured game audio (0.0-1.0) |
GetSourceName() | Returns "LCKFMOD" |
Fields
| Field | Type | Default | Description |
|---|
Samplerate | int32 | 48000 | FMOD output sample rate in Hz. |
Ensure the FMOD sample rate matches your encoder configuration (typically 48000 Hz). Mismatched sample rates between game audio and voice chat cause distortion.
FLCKFMODModule
Module that manages the lifecycle of FLCKFMODSource.
class FLCKFMODModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
private:
TSharedPtr<FLCKFMODSource> FeatureInstance;
};
IMPLEMENT_MODULE(FLCKFMODModule, LCKFMOD)
On startup, the module detects the FMODStudio plugin, creates an FLCKFMODSource, and registers it as a modular feature. On shutdown, it detaches the DSP callback, unregisters, and destroys the source.
LCKFMOD requires the FMODStudio plugin which must be downloaded separately from fmod.com. The LCKFMOD plugin is disabled by default and will not compile without FMODStudio installed.
Log Category
DECLARE_LOG_CATEGORY_EXTERN(LogLCKFMOD, Log, All);