This class is used to post audio from one source to multiple threads. 更多...
#include <MultithreadedPatching.h>
Public 成员函数 | |
| FPatchOutputStrongPtr | AddNewPatch (int32 MaxLatencyInSamples, float InGain) |
| Adds a new output. 更多... | |
| FPatchSplitter () | |
| Constructor. | |
| int32 | MaxNumberOfSamplesThatCanBePushed () |
| This function call gets the maximum number of samples that's safe to push. 更多... | |
| int32 | Num () |
| This returns the number of outputs currently connected to this patch splitter. 更多... | |
| int32 | PushAudio (const float *InBuffer, int32 InNumSamples) |
| This call pushes audio to all outputs connected to this splitter. 更多... | |
| ~FPatchSplitter () | |
| The destructor will mark every still connected FPatchOutput as stale. | |
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.
| 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.
| int32 Audio::FPatchSplitter::MaxNumberOfSamplesThatCanBePushed | ( | ) |
This function call gets the maximum number of samples that's safe to push.
Thread safe, but blocks for PushAudio.
| int32 Audio::FPatchSplitter::Num | ( | ) |
This returns the number of outputs currently connected to this patch splitter.
Thread safe, but blocks for 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.