Skip to main content
Module: LCKWwise | Version: 1.0 | Platforms: Win64, Android

Overview

LCKWwise captures game audio from the Wwise sound engine using a capture callback on the output device. It handles ambisonic-to-stereo downmix automatically, producing stereo PCM data regardless of the Wwise output configuration.

Supported Channels

ChannelSupportedDescription
GameYesWwise master output capture
MicrophoneNoUse LCKUnrealAudio or LCKOboe
VoiceChatNoUse LCKVivox

FLCKWwiseSource

Audio source class that captures Wwise master output via a capture callback. Implements ILCKFeatureInstance with automatic ambisonic-to-stereo conversion.
class FLCKWwiseSource : 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;

    // Wwise-specific
    AkOutputDeviceID OutputDeviceId = AK_INVALID_OUTPUT_DEVICE_ID;

protected:
    TLCKAudioChannelsMask SupportedChannels = ELCKAudioChannel::Game;
};

ILCKFeatureInstance Methods

MethodBehavior
StartCapture()Registers capture callback on the Wwise output device
StartCapture(Channels)Begins capture if Game is in the requested channel mask
StopCapture()Unregisters the capture callback and stops capture
GetVolume()Returns current RMS volume of captured game audio (0.0-1.0)
GetSourceName()Returns "LCKWwise"

Fields

FieldTypeDefaultDescription
OutputDeviceIdAkOutputDeviceIDAK_INVALID_OUTPUT_DEVICE_IDWwise output device to capture from. Invalid ID uses the default device.

Ambisonic-to-Stereo Conversion

If Wwise is configured with ambisonic output, FLCKWwiseSource automatically converts the multi-channel ambisonic data to stereo before firing the audio delegate. No additional configuration is required.
┌──────────────────────────────────────┐
│         Wwise Sound Engine           │
├──────────────────────────────────────┤
│  Events → Buses → Master Output     │
│                       ↓              │
│          Capture Callback            │
└───────────────┬──────────────────────┘

         ┌──────▼──────┐
         │  LCKWwise   │
         │  Capture    │
         │  ↓          │
         │  Ambisonic  │
         │  → Stereo   │
         └─────────────┘

FLCKWwiseModule

Module that manages the lifecycle of FLCKWwiseSource.
class FLCKWwiseModule : public IModuleInterface
{
public:
    virtual void StartupModule() override;
    virtual void ShutdownModule() override;

private:
    TSharedPtr<FLCKWwiseSource> FeatureInstance;
};

IMPLEMENT_MODULE(FLCKWwiseModule, LCKWwise)
On startup, the module creates an FLCKWwiseSource and registers it as a modular feature. On shutdown, it unregisters the capture callback, unregisters the modular feature, and destroys the source.
LCKWwise requires the Wwise Unreal integration plugin. The module will not compile without the Wwise SDK headers available.

Log Category

DECLARE_LOG_CATEGORY_EXTERN(LogLCKWwise, Log, All);