Navigation
API > API/Runtime > API/Runtime/MediaUtils
| Name | FMediaAudioResampler |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaUtils/Public/MediaAudioResampler.h |
| Include Path | #include "MediaAudioResampler.h" |
Syntax
class FMediaAudioResampler
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMediaAudioResampler() |
Default constructor. | MediaAudioResampler.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrentFrame | float | Cached sample values of the current frame. | MediaAudioResampler.h | |
| FrameAlpha | float | Linear interpolation between current and next frame. | MediaAudioResampler.h | |
| FrameIndex | int64 | Index of the current input read position. | MediaAudioResampler.h | |
| Input | TArray< float > | The input buffer. | MediaAudioResampler.h | |
| InputDuration | FTimespan | Duration of the input buffer. | MediaAudioResampler.h | |
| InputFrames | uint32 | Number of frames in input buffer. | MediaAudioResampler.h | |
| InputSampleRate | uint32 | Sample rate of input buffer. | MediaAudioResampler.h | |
| InputTime | FMediaTimeStamp | Start time of the input buffer. | MediaAudioResampler.h | |
| LastFrameIndex | int64 | Index of the previously generated frame (to avoid calculating it again). | MediaAudioResampler.h | |
| LastRate | float | The play rate of the previously generated frame. | MediaAudioResampler.h | |
| NextFrame | float | Cached sample values of the next frame. | MediaAudioResampler.h | |
| OutputChannels | uint32 | Number of channels in the output. | MediaAudioResampler.h | |
| OutputSampleRate | uint32 | Sample rate of the output. | MediaAudioResampler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Flush() |
Flush the resampler. | MediaAudioResampler.h | |
uint32 Generate
(
float* Output, |
Generate the next frame of audio. | MediaAudioResampler.h | |
void Initialize
(
const uint32 InOutputChannels, |
Initialize the resampler. | MediaAudioResampler.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearInput () |
Clear the input samples. | MediaAudioResampler.h | |
bool SetInput
(
const TSharedPtr< IMediaAudioSample, ESPMode::ThreadSafe >& Sample |
Set the audio sample to be resampled. | MediaAudioResampler.h |