Module: LCKOboe | Version: 1.0 | Platforms: Android
Overview
LCKOboe provides low-latency microphone capture on Android using Google’s Oboe audio library. It is microphone-only; pair it with LCKFMOD or LCKWwise for game audio capture.
Supported Channels
| Channel | Supported | Description |
|---|
Game | No | Use LCKFMOD, LCKWwise, or LCKUnrealAudio |
Microphone | Yes | Low-latency Android mic via Oboe |
VoiceChat | No | Use LCKVivox |
FLCKOboeSource
Audio source class that captures microphone input on Android through the Oboe library. Implements ILCKFeatureInstance.
class FLCKOboeSource : 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;
protected:
TLCKAudioChannelsMask SupportedChannels = ELCKAudioChannel::Microphone;
};
ILCKFeatureInstance Methods
| Method | Behavior |
|---|
StartCapture() | Opens Oboe audio stream and begins microphone recording |
StartCapture(Channels) | Begins capture if Microphone is in the requested channel mask |
StopCapture() | Closes the Oboe stream and stops recording |
GetVolume() | Returns current RMS volume of microphone input (0.0-1.0) |
GetSourceName() | Returns "LCKOboe" |
Android microphone capture requires the RECORD_AUDIO permission. Ensure your app requests this permission at runtime before calling StartCapture().
FLCKOboeModule
Module that manages the lifecycle of FLCKOboeSource.
class FLCKOboeModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
private:
TSharedPtr<FLCKOboeSource> FeatureInstance;
};
IMPLEMENT_MODULE(FLCKOboeModule, LCKOboe)
On startup, the module creates an FLCKOboeSource and registers it as a modular feature. The module only loads on Android; it is excluded from other platforms at build time.
Log Category
DECLARE_LOG_CATEGORY_EXTERN(LogLCKOboe, Log, All);