UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Audio::FPatchSplitter Class Reference

#include <MultithreadedPatching.h>

Public Member Functions

SIGNALPROCESSING_API FPatchOutputStrongPtr AddNewPatch (int32 MaxLatencyInSamples, float InGain)
 
SIGNALPROCESSING_API void AddNewPatch (FPatchOutputStrongPtr &&InPatchOutputStrongPtr)
 
SIGNALPROCESSING_API void AddNewPatch (const FPatchOutputStrongPtr &InPatchOutputStrongPtr)
 
SIGNALPROCESSING_API int32 PushAudio (const float *InBuffer, int32 InNumSamples)
 
SIGNALPROCESSING_API int32 Num ()
 
SIGNALPROCESSING_API int32 MaxNumberOfSamplesThatCanBePushed ()
 

Detailed Description

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.

Member Function Documentation

◆ AddNewPatch() [1/3]

void Audio::FPatchSplitter::AddNewPatch ( const FPatchOutputStrongPtr InPatchOutputStrongPtr)

◆ AddNewPatch() [2/3]

void Audio::FPatchSplitter::AddNewPatch ( FPatchOutputStrongPtr &&  InPatchOutputStrongPtr)

Adds a new a patch from an existing patch output.

◆ AddNewPatch() [3/3]

FPatchOutputStrongPtr Audio::FPatchSplitter::AddNewPatch ( int32  MaxLatencyInSamples,
float  InGain 
)

Adds a new output. Calling this is thread safe, but individual instances of FPatchOutput are only safe to be used from one thread. the returned FPatchOutputPtr can be safely destroyed at any point.

◆ MaxNumberOfSamplesThatCanBePushed()

int32 Audio::FPatchSplitter::MaxNumberOfSamplesThatCanBePushed ( )

This function call gets the maximum number of samples that's safe to push. Thread safe, but blocks for PushAudio.

◆ Num()

int32 Audio::FPatchSplitter::Num ( )

This returns the number of outputs currently connected to this patch splitter. Thread safe, but blocks for PushAudio.

◆ PushAudio()

int32 Audio::FPatchSplitter::PushAudio ( const float InBuffer,
int32  InNumSamples 
)

This call pushes audio to all outputs connected to this splitter. Only should be called from one thread.


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