This class can be thought of as an output for a single constructed instance of FPatchInput. 更多...
#include <MultithreadedPatching.h>
Public 成员函数 | |
| FPatchOutput () | |
| The default constructor will result in an uninitialized, disconnected patch point, which | |
| int32 | GetNumSamplesAvailable () |
| Returns the current number of samples buffered on this output. | |
| bool | IsInputStale () const |
| Returns true if the input for this patch has been destroyed. | |
| int32 | MixInAudio (float *OutBuffer, int32 NumSamples, bool bUseLatestAudio) |
| Sums the minimum of NumSamples or however many samples are available into OutBuffer. 更多... | |
| int32 | PopAudio (float *OutBuffer, int32 NumSamples, bool bUseLatestAudio) |
| Copies the minimum of NumSamples or however many samples are available into OutBuffer. 更多... | |
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);
| int32 Audio::FPatchOutput::MixInAudio | ( | float * | OutBuffer, |
| int32 | NumSamples, | ||
| bool | bUseLatestAudio | ||
| ) |
Sums the minimum of NumSamples or however many samples are available into OutBuffer.
Returns the number of samples summed into OutBuffer.
| int32 Audio::FPatchOutput::PopAudio | ( | float * | OutBuffer, |
| int32 | NumSamples, | ||
| bool | bUseLatestAudio | ||
| ) |
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.