UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FVoiceCaptureCoreAudio Class Reference
+ Inheritance diagram for FVoiceCaptureCoreAudio:

Public Member Functions

 FVoiceCaptureCoreAudio ()
 
 ~FVoiceCaptureCoreAudio ()
 
virtual bool Init (const FString &DeviceName, int32 InSampleRate, int32 InNumChannels) override
 
virtual void Shutdown () override
 
virtual bool Start () override
 
virtual void Stop () override
 
virtual bool ChangeDevice (const FString &DeviceName, int32 SampleRate, int32 NumChannels)
 
virtual bool IsCapturing () override
 
virtual EVoiceCaptureState::Type GetCaptureState (uint32 &OutAvailableVoiceData) const override
 
virtual EVoiceCaptureState::Type GetVoiceData (uint8 *OutVoiceBuffer, uint32 InVoiceBufferSize, uint32 &OutAvailableVoiceData) override
 
virtual int32 GetBufferSize () const
 
virtual void DumpState () const
 
- Public Member Functions inherited from IVoiceCapture
virtual ~IVoiceCapture ()
 
virtual EVoiceCaptureState::Type GetVoiceData (uint8 *OutVoiceBuffer, uint32 InVoiceBufferSize, uint32 &OutAvailableVoiceData, uint64 &OutSampleCounter)
 
Audio::FPatchOutputStrongPtr GetMicrophoneAudio (int32 MaxExpectedLatencyInSamples, float Gain)
 
virtual float GetCurrentAmplitude () const
 
- Public Member Functions inherited from TSharedFromThis< IVoiceCapture >
TSharedRef< IVoiceCapture, Mode > AsShared ()
 
TSharedRef< IVoiceCapture const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< IVoiceCapture, Mode > AsWeak ()
 
TWeakPtr< IVoiceCapture const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static OSStatus InputProc (void *RefCon, AudioUnitRenderActionFlags *IOActionFlags, const AudioTimeStamp *InTimeStamp, UInt32 InBusNumber, UInt32 InNumberFrames, AudioBufferList *IOData)
 

Additional Inherited Members

- Protected Member Functions inherited from IVoiceCapture
 IVoiceCapture ()
 
- Protected Member Functions inherited from TSharedFromThis< IVoiceCapture >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< IVoiceCapture >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Protected Attributes inherited from IVoiceCapture
Audio::FPatchSplitter MicrophoneOutput
 

Detailed Description

Implementation of voice capture using CoreAudio

Constructor & Destructor Documentation

◆ FVoiceCaptureCoreAudio()

FVoiceCaptureCoreAudio::FVoiceCaptureCoreAudio ( )
inline

◆ ~FVoiceCaptureCoreAudio()

FVoiceCaptureCoreAudio::~FVoiceCaptureCoreAudio ( )
inline

Member Function Documentation

◆ ChangeDevice()

virtual bool FVoiceCaptureCoreAudio::ChangeDevice ( const FString &  DeviceName,
int32  SampleRate,
int32  NumChannels 
)
inlinevirtual

Change the associated capture device

Parameters
DeviceNamename of device to capture audio data with, empty for default device
SampleRatesampling rate of voice capture
NumChannelsnumber of channels to capture
Returns
true if change was successful, false otherwise

NYI

Implements IVoiceCapture.

◆ DumpState()

virtual void FVoiceCaptureCoreAudio::DumpState ( ) const
inlinevirtual

Dump the state of the voice capture device

NYI

Implements IVoiceCapture.

◆ GetBufferSize()

virtual int32 FVoiceCaptureCoreAudio::GetBufferSize ( ) const
inlinevirtual
Returns
number of bytes currently allocated in the capture buffer

NYI

Implements IVoiceCapture.

◆ GetCaptureState()

virtual EVoiceCaptureState::Type FVoiceCaptureCoreAudio::GetCaptureState ( uint32 OutAvailableVoiceData) const
inlineoverridevirtual

Return the state of the voice data and its availability

Parameters
OutAvailableVoiceDatasize, in bytes, of available voice data
Returns
state of the voice capture buffer

Implements IVoiceCapture.

◆ GetVoiceData()

virtual EVoiceCaptureState::Type FVoiceCaptureCoreAudio::GetVoiceData ( uint8 OutVoiceBuffer,
uint32  InVoiceBufferSize,
uint32 OutAvailableVoiceData 
)
inlineoverridevirtual

Fill a buffer with all available voice data

Parameters
OutVoiceBufferallocated buffer to fill with voice data
InVoiceBufferSizesize, in bytes, of allocated buffer
OutAvailableVoiceDatasize, in bytes, of data placed in the OutVoiceBuffer
OutSampleCounteroptional parameter for beginning sample of this buffer.
Returns
state of the voice capture buffer

Reimplemented from IVoiceCapture.

◆ Init()

virtual bool FVoiceCaptureCoreAudio::Init ( const FString &  DeviceName,
int32  SampleRate,
int32  NumChannels 
)
inlineoverridevirtual

Initialize the voice capture object

Parameters
DeviceNamename of device to capture audio data with, empty for default device
SampleRatesampling rate of voice capture
NumChannelsnumber of channels to capture
Returns
true if successful, false otherwise

Implements IVoiceCapture.

◆ InputProc()

static OSStatus FVoiceCaptureCoreAudio::InputProc ( void RefCon,
AudioUnitRenderActionFlags IOActionFlags,
const AudioTimeStamp InTimeStamp,
UInt32  InBusNumber,
UInt32  InNumberFrames,
AudioBufferList IOData 
)
inlinestatic

◆ IsCapturing()

virtual bool FVoiceCaptureCoreAudio::IsCapturing ( )
inlineoverridevirtual

Is the voice capture object actively capturing

Returns
true if voice is being captured, false otherwise

Implements IVoiceCapture.

◆ Shutdown()

virtual void FVoiceCaptureCoreAudio::Shutdown ( )
inlineoverridevirtual

Shutdown the voice capture object

Implements IVoiceCapture.

◆ Start()

virtual bool FVoiceCaptureCoreAudio::Start ( )
inlineoverridevirtual

Start capturing voice

Returns
true if successfully started, false otherwise

Implements IVoiceCapture.

◆ Stop()

virtual void FVoiceCaptureCoreAudio::Stop ( )
inlineoverridevirtual

Stop capturing voice

Implements IVoiceCapture.


The documentation for this class was generated from the following file: