FPatchSplitter

This class is used to post audio from one source to multiple threads.

Choose your operating system:

Windows

macOS

Linux

References

Module

SignalProcessing

Header

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

Include

#include "DSP/MultithreadedPatching.h"

Syntax

class FPatchSplitter

Remarks

This class is used to post audio from one source to multiple threads. This class is SPMC: multiple threads can call FPatchOutputStrongPtr->PopAudio safely, but only one thread can call PushAudio.

Functions

Name Description

Public function

void

 

AddNewPatch

(
    FPatchOutputStrongPtr&& InPatchOut...
)

Adds a new a patch from an existing patch output.

Public function

void

 

AddNewPatch

(
    const FPatchOutputStrongPtr& InPat...
)

Adds a new output.

Public function

FPatchOutput...

 

AddNewPatch

(
    int32 MaxLatencyInSamples,
    float InGain
)

Adds a new output.

Public function

int32

 

MaxNumberOfSamplesThatCanBePushed()

This function call gets the maximum number of samples that's safe to push.

Public function

int32

 

Num()

This returns the number of outputs currently connected to this patch splitter.

Public function

int32

 

PushAudio

(
    const float* InBuffer,
    int32 InNumSamples
)

This call pushes audio to all outputs connected to this splitter.