![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MultithreadedPatching.h>
Public Member Functions | |
| SIGNALPROCESSING_API | FPatchOutput (int32 InMaxCapacity, float InGain=1.0f) |
| SIGNALPROCESSING_API | FPatchOutput () |
| virtual SIGNALPROCESSING_API | ~FPatchOutput () |
| SIGNALPROCESSING_API int32 | PopAudio (float *OutBuffer, int32 NumSamples, bool bUseLatestAudio) |
| SIGNALPROCESSING_API int32 | MixInAudio (float *OutBuffer, int32 NumSamples, bool bUseLatestAudio) |
| SIGNALPROCESSING_API int32 | GetNumSamplesAvailable () const |
| SIGNALPROCESSING_API bool | WaitUntilNumSamplesAvailable (int32 NumSamples, uint32 TimeOutMilliseconds=MAX_uint32) |
| SIGNALPROCESSING_API bool | IsInputStale () const |
Friends | |
| class | FPatchInput |
| class | FPatchMixer |
| class | FPatchSplitter |
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);
| Audio::FPatchOutput::FPatchOutput | ( | ) |
The default constructor will result in an uninitialized, disconnected patch point.
|
virtual |
| int32 Audio::FPatchOutput::GetNumSamplesAvailable | ( | ) | const |
Returns the current number of samples buffered on this output.
| bool Audio::FPatchOutput::IsInputStale | ( | ) | const |
Returns true if the input for this patch has been destroyed.
Sums the minimum of NumSamples or however many samples are available into OutBuffer. Returns the number of samples summed into OutBuffer.
Copies the minimum of NumSamples or however many samples are available into OutBuffer. Returns the number of samples copied, or -1 if this output's corresponding input has been destroyed.
| bool Audio::FPatchOutput::WaitUntilNumSamplesAvailable | ( | int32 | NumSamples, |
| uint32 | TimeOutMilliseconds = MAX_uint32 |
||
| ) |
Pauses the current thread until there are the given number of samples available to pop. Will return true if it succeeded, false if it timed out.
|
friend |
|
friend |
|
friend |