FAudioCapture

Class which handles audio capture internally, implemented with a back-end per platform.

Choose your operating system:

Windows

macOS

Linux

References

Module

AudioCaptureCore

Header

/Engine/Source/Runtime/AudioCaptureCore/Public/AudioCaptureCore.h

Include

#include "AudioCaptureCore.h"

Syntax

class FAudioCapture

Remarks

Class which handles audio capture internally, implemented with a back-end per platform.

Constructors

Name Description

Public function

FAudioCapture()

Destructors

Name Description

Public function

~FAudioCapture()

Functions

Name Description

Public function

bool

 

AbortStream()

Abort the audio capture stream (stop and close)

Public function

bool

 

CloseStream()

Closes the audio capture stream.

Public function

bool

 

GetCaptureDeviceInfo

(
    FCaptureDeviceInfo& OutInfo,
    int32 DeviceIndex
)

Returns the audio capture device information at the given Id.

Public function

int32

 

GetCaptureDevicesAvailable

(
    TArray< FCaptureDeviceInfo >& OutD...
)

Returns the total amount of audio devices.

Public function

bool

 

GetIfHardwareFeatureIsSupported

(
    EHardwareInputFeature FeatureType
)

Public function Const

int32

 

GetSampleRate()

Get the sample rate in use by the stream.

Public function Const

bool

 

GetStreamTime

(
    double& OutStreamTime
)

Get the stream time of the audio capture stream.

Public function Const

bool

 

IsCapturing()

Returns true if the audio capture stream is currently capturing audio.

Public function Const

bool

 

IsStreamOpen()

Returns if the audio capture stream has been opened.

Public function

bool

 

OpenCaptureStream

(
    const FAudioCaptureDeviceParams& I...,
    FOnCaptureFunction OnCapture,
    uint32 NumFramesDesired
)

Opens the audio capture stream with the given parameters.

Public function

bool

 

RegisterUser

(
    const TCHAR* UserId
)

Adds a user to the system so we can use its devices.

Public function

void

 

SetHardwareFeatureEnabled

(
    EHardwareInputFeature FeatureType,
    bool bIsEnabled
)

Public function

bool

 

StartStream()

Start the audio capture stream.

Public function

bool

 

StopStream()

Stop the audio capture stream.

Public function

bool

 

UnregisterUser

(
    const TCHAR* UserId
)

Removes a user added with RegisterUser.