FPatchOutput

This class can be thought of as an output for a single constructed instance of [FPatchInput](API\Runtime\SignalProcessing\DSP\FPatchInput).

Windows
MacOS
Linux

References

Module

SignalProcessing

Header

/Engine/Source/Runtime/SignalProcessing/Public/DSP/MultithreadedPatching.h

Include

#include "DSP/MultithreadedPatching.h"

Syntax

struct FPatchOutput

Remarks

This class can be thought of as an output for a single constructed instance of FPatchInput. Each FPatchOutput can only be connected to one FPatchInput. To route multiple outputs, see FPatchSplitter. To route multiple inputs, see FPatchMixer.

Example usage:

FPatchOutputStrongPtr NewOutput(new FPatchOutput(4096)); FPatchInput NewInput(NewOutput);

On one thread, push audio to the output: NewInput.PushAudio(AudioBufferPtr, AudioBufferNumSamples);

and on a seperate thread, retrieve the audio: NewOutput->PopAudio(OutAudioBufferPtr, AudioBufferNumSamples);

Constructors

Name Description

Public function

FPatchOutput()

The default constructor will result in an uninitialized, disconnected patch point, which

Public function

FPatchOutput

(
    int32 MaxCapacity,
    float InGain
)

Functions

Name Description

Public function

int32

 

GetNumSamplesAvailable()

Returns the current number of samples buffered on this output.

Public function Const

bool

 

IsInputStale()

Returns true if the input for this patch has been destroyed.

Public function

int32

 

MixInAudio

(
    float* OutBuffer,
    int32 NumSamples,
    bool bUseLatestAudio
)

Sums the minimum of NumSamples or however many samples are available into OutBuffer.

Public function

int32

 

PopAudio

(
    float* OutBuffer,
    int32 NumSamples,
    bool bUseLatestAudio
)

Copies the minimum of NumSamples or however many samples are available into OutBuffer.

Constants

Name

Description

PatchIDCounter

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss