Navigation
API > API/Runtime > API/Runtime/MediaAssets
Class implements an ISoundGenerator to feed decoded audio to audio renderering async tasks.
| Name | FMediaSoundGenerator |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaAssets/Public/MediaSoundComponent.h |
| Include Path | #include "MediaSoundComponent.h" |
Syntax
class FMediaSoundGenerator : public ISoundGenerator
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMediaSoundGenerator
(
FSoundGeneratorParams& InParams |
MediaSoundComponent.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMediaSoundGenerator() |
MediaSoundComponent.h |
Structs
| Name | Remarks |
|---|---|
| FSoundGeneratorParams |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnalysisCritSect | FCriticalSection | MediaSoundComponent.h | ||
| AudioScratchBuffer | Audio::AlignedFloatBuffer | Scratch buffer to mix in source audio to from decoder | MediaSoundComponent.h | |
| bEnvelopeFollowerSettingsChanged | bool | MediaSoundComponent.h | ||
| CachedRate | TAtomic< float > | MediaSoundComponent.h | ||
| CachedTime | TAtomic< FTimespan > | MediaSoundComponent.h | ||
| CurrentEnvelopeValue | float | MediaSoundComponent.h | ||
| EnvelopeFollower | Audio::FEnvelopeFollower | MediaSoundComponent.h | ||
| LastPlaySampleTime | TAtomic< FTimespan > | MediaSoundComponent.h | ||
| Params | FSoundGeneratorParams | MediaSoundComponent.h | ||
| Resampler | FMediaAudioResampler | The audio resampler. | MediaSoundComponent.h | |
| SampleQueueCritSect | FCriticalSection | MediaSoundComponent.h | ||
| SpectrumAnalyzer | Audio::FAsyncSpectrumAnalyzer | Spectrum analyzer used for analyzing audio in media. | MediaSoundComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetCurrentEnvelopeValue() |
MediaSoundComponent.h | ||
FTimespan GetLastPlayTime() |
MediaSoundComponent.h | ||
TArray< FMediaSoundComponentSpectralData > GetNormalizedSpectralData() |
MediaSoundComponent.h | ||
TArray< FMediaSoundComponentSpectralData > GetSpectralData() |
MediaSoundComponent.h | ||
void SetCachedData
(
float InCachedRate, |
MediaSoundComponent.h | ||
void SetEnableEnvelopeFollowing
(
bool bInEnvelopeFollowingEnabled |
MediaSoundComponent.h | ||
void SetEnableSpectralAnalysis
(
bool bInSpectralAnlaysisEnabled |
MediaSoundComponent.h | ||
void SetEnvelopeFollowingSettings
(
int32 InAttackTimeMsec, |
MediaSoundComponent.h | ||
void SetLastPlaySampleTime
(
const FTimespan& InLastPlaySampleTime |
MediaSoundComponent.h | ||
void SetSampleQueue
(
TSharedPtr< FMediaAudioSampleQueue, ESPMode::ThreadSafe >& InSampleQueue |
MediaSoundComponent.h | ||
void SetSpectrumAnalyzerSettings
(
Audio::FSpectrumAnalyzerSettings::EFFTSize InFFTSize, |
MediaSoundComponent.h |
Overridden from ISoundGenerator
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnEndGenerate() |
MediaSoundComponent.h | ||
virtual int32 OnGenerateAudio
(
float* OutAudio, |
MediaSoundComponent.h |