![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MultichannelLinearResampler.h>
Static Public Attributes | |
| static SIGNALPROCESSING_API const float | MaxFrameRatio = 100.f |
| static SIGNALPROCESSING_API const float | MinFrameRatio = 0.001f |
Linear resampler working on multichannel buffers
| Audio::FMultichannelLinearResampler::FMultichannelLinearResampler | ( | int32 | InNumChannels | ) |
Construct a linear resampler.
| InNumChannel | - Number of audio channels in input and output buffers. |
| int32 Audio::FMultichannelLinearResampler::GetNumInputFramesNeededToProduceOutputFrames | ( | int32 | InNumOutputFrames | ) | const |
Returns the minimum number of input frames needed to produce the desired number of output frames given the current state of the resampler.
| InNumOutputFrames | - The desired number of output frames. |
| float Audio::FMultichannelLinearResampler::MapInputFrameToOutputFrame | ( | float | InInputFrameIndex | ) | const |
Translates an input frame index to an output frame index given the state of the resampler.
Note: Indices are relative to the buffers passed to ProcessAudio(...). The resampler does not maintain a sample counter between calls to ProcessAudio(...).
| InInputFrameIndex | - Index of input frame. |
| float Audio::FMultichannelLinearResampler::MapOutputFrameToInputFrame | ( | float | InOutputFrameIndex | ) | const |
Translates an output frame index to an input frame index given the state of the resampler.
Note: Indices are relative to the buffers passed to ProcessAudio(...). The resampler does not maintain a sample counter between calls to ProcessAudio(...).
| InOutputFrameIndex | - Index of output frame. |
| int32 Audio::FMultichannelLinearResampler::ProcessAndConsumeAudio | ( | FMultichannelCircularBuffer & | InAudio, |
| FMultichannelBuffer & | OutAudio | ||
| ) |
Consumes audio from the input buffer and produces audio in the output buffer. The desired number of frames to produce is determined by the output audio buffer size. For the desired number of samples to be produced, the input audio must have the minimum number of frames needed to produce the output frames (see GetNumInputFramesNeededToProduceOutputFrames(...)). Input samples which are no longer needed are removed from the input buffer.
| InAudio | - Multichannel circular buffer of input audio. |
| OutAudio | - Multichannel buffer of output audio. |
| int32 Audio::FMultichannelLinearResampler::ProcessAndConsumeAudio | ( | FMultichannelCircularBuffer & | InAudio, |
| FMultichannelBufferView & | OutAudio | ||
| ) |
| void Audio::FMultichannelLinearResampler::SetFrameRatio | ( | float | InRatio, |
| int32 | InNumFramesToInterpolate = 0 |
||
| ) |
Sets the number of input frames to read per an output frame. 0.5 is half speed, 1.f is normal speed, 2.0 is double speed.
| InRatio | - Ratio of input frames consumed per an output frame produced. |
| InNumFramesToInterpolate | - Number of output frames over which to interpolate the frame ratio. |
|
static |
|
static |