This class is used to mix multiple inputs from disparate threads to a single mixdown and deliver that mixdown to multiple outputs. 更多...
#include <MultithreadedPatching.h>
Public 成员函数 | |
| FPatchInput | AddNewInput (int32 MaxLatencyInSamples, float InGain) |
| Adds a new input to the tap collector. 更多... | |
| FPatchOutputStrongPtr | AddNewOutput (int32 MaxLatencyInSamples, float InGain) |
| Adds a new output. 更多... | |
| FPatchMixerSplitter () | |
| Constructor. | |
| void | ProcessAudio () |
| Mixes audio from all inputs and pushes it to all outputs. 更多... | |
| void | RemovePatch (const FPatchInput &TapInput) |
| Removes a tap from the tap collector. 更多... | |
| virtual | ~FPatchMixerSplitter () |
| The destructor will mark every still connected FPatchOutput as stale. | |
Protected 成员函数 | |
| virtual void | OnProcessAudio (TArrayView< const float > InAudio) |
| This class can be subclassed with OnProcessAudio overridden. | |
This class is used to mix multiple inputs from disparate threads to a single mixdown and deliver that mixdown to multiple outputs.
This class is MPCMC, but only one thread can and should call ProcessAudio().
| FPatchInput Audio::FPatchMixerSplitter::AddNewInput | ( | int32 | MaxLatencyInSamples, |
| float | InGain | ||
| ) |
Adds a new input to the tap collector.
Calling this is thread safe, but individual instances of FPatchInput are only safe to be used from one thread.
| FPatchOutputStrongPtr Audio::FPatchMixerSplitter::AddNewOutput | ( | 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.
| void Audio::FPatchMixerSplitter::ProcessAudio | ( | ) |
Mixes audio from all inputs and pushes it to all outputs.
Should be called regularly.
| void Audio::FPatchMixerSplitter::RemovePatch | ( | const FPatchInput & | TapInput | ) |
Removes a tap from the tap collector.
Calling this is thread safe, though FPatchOutput will likely not be deleted until the next call of PopAudio.