Class AudioAnalyzerLoopback

Inheritance Relationships

Base Type

Class Documentation

class AudioAnalyzerLoopback : public AudioAnalyzerSource

Audio Analyzer Loopback Source.

This class will be used to capture the audio in real time from a microphone, can playback the captured audio too

Public Functions

AudioAnalyzerLoopback()

Constructor

~AudioAnalyzerLoopback()

Destructor This will unload the audio too

AudioAnalyzerLoopback(AudioAnalyzerLoopback const &x) = delete

Disable copy constructor

Parameters

x

void operator=(AudioAnalyzerLoopback const &x) = delete

Disable copy assignment

Parameters

x

bool initializeAudio(float captureBufferSeconds)

Initializes the capturer audio info and opens the audio capture (and player) device

Parameters

captureBufferSeconds – Capture buffer size in seconds

Returns

The audio initilization result

void unloadAudio()

Closes the audio capturer (and player) device

void start()

Starts the audio capturer (and player playback)

void stop()

Stops the audio capturer (and player playback)

bool isCapturing() const

Returns if the device is currently capturing audio

Returns

Device is playing

virtual float getPlaybackProgress(float &bufferPosTime)

Returns the total capture duration and buffer postion time

Parameters

bufferPosTime[out] Current buffer position (seconds)

Returns

float Duration in seconds

float getPlaybackProgress()

Returns the total capture duration

Returns

float Duration in seconds

void setDefaultAudioDevice(const FString &sourceDeviceName)

Set default source audio device

Parameters

sourceDeviceName – Audio device name

void getDefaultAudioDevice(FString &sourceDeviceName)

Get default source audio device

Parameters

sourceDeviceName[out] Audio device name

const AudioAnalyzerDeviceInfo &getAudioDeviceInfo() const

Returns the audio device info

Returns

Audio device info structure

inline virtual bool hasOnlyHeader() const

Returns if only has been loaded the header data

Returns

Has onkly header data

inline virtual bool needsBufferOffset() const

Returns if the buffer needs to be offset

Returns

Needs buffer offset