Navigation
API > API/Runtime > API/Runtime/AudioAnalyzer
UAudioAnalyzerNRT applies an analyzer to a sound using specific settings, stores the results and exposes them via blueprints.
Subclasses of UAudioAnalyzerNRT must implement GetAnalyzerNRTFactoryName() to associate the UAudioAnalyzerNRT with an IAudioAnalyzerNRTFactory implementation.
To support blueprint access, subclasses can implement UFUNCTIONs to expose the data returned by GetResult().
| Name | UAudioAnalyzerNRT |
| Type | class |
| Header File | /Engine/Source/Runtime/AudioAnalyzer/Classes/AudioAnalyzerNRT.h |
| Include Path | #include "AudioAnalyzerNRT.h" |
Syntax
UCLASS (Abstract, EditInlineNew, BlueprintType, MinimalAPI)
class UAudioAnalyzerNRT : public UAudioAnalyzerAssetBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UAudioAnalyzerAssetBase → UAudioAnalyzerNRT
Derived Classes
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FResultId | int32 | ID to keep track of results. | AudioAnalyzerNRT.h |
| FResultSharedPtr | TSharedPtr< Audio::IAnalyzerNRTResult, ESPMode::ThreadSafe > | Thread safe shared point to result object. | AudioAnalyzerNRT.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DurationInSeconds | float | The duration of the analyzed audio in seconds. | AudioAnalyzerNRT.h |
|
| OnAnalysisComplete | FOnAudioAnalyzerNRTAnalysisComplete | Delegate to receive all meter results, per-channel, since last delegate call. | AudioAnalyzerNRT.h |
|
| Sound | TObjectPtr< USoundWave > | The USoundWave which is analyzed. | AudioAnalyzerNRT.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnalyzeAudioDelegateHandles | TMap< UAudioAnalyzerNRTSettings *, FDelegateHandle > | AudioAnalyzerNRT.h | ||
| CurrentResultId | TAtomic< FResultId > | Result id of the current result. | AudioAnalyzerNRT.h | |
| Result | TSharedPtr< Audio::IAnalyzerNRTResult, ESPMode::ThreadSafe > | AudioAnalyzerNRT.h | ||
| ResultCriticalSection | FCriticalSection | Critical section is mutable so it can still be locked within const methods. | AudioAnalyzerNRT.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AnalyzeAudio() |
Performs the analaysis of the audio | AudioAnalyzerNRT.h |
|
TSharedPtr< ResultType, ESPMode::ThreadSafe > GetResult () |
Returns the result object generated by the associated IAudioAnalyzerNRTFactory. | AudioAnalyzerNRT.h | |
TSharedPtr< const ResultType, ESPMode::ThreadSafe > GetResult () |
Returns the result object generated by the associated IAudioAnalyzerNRTFactory. | AudioAnalyzerNRT.h | |
virtual TUniquePtr< Audio::IAnalyzerNRTSettings > GetSettings
(
const float InSampleRate, |
Implementations can override this method to create settings objects specific for their analyzer. | AudioAnalyzerNRT.h | |
void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a UPROPERTY of this class is edited. | AudioAnalyzerNRT.h | |
void PreEditChange
(
FProperty* PropertyAboutToChange |
Called before a UPROPERTY of this class is edited. | AudioAnalyzerNRT.h | |
virtual void Serialize
(
FArchive& Ar |
Performs serialization of results. | AudioAnalyzerNRT.h | |
void SetResult
(
FResultSharedPtr NewResult |
AudioAnalyzerNRT.h | ||
void SetResultIfLatest
(
FResultSharedPtr NewResult, |
This will only store the result if the passed InResultId matches the CurrentResultId. | AudioAnalyzerNRT.h | |
void SetSound
(
USoundWave* InSound |
AudioAnalyzerNRT.h |
|
|
virtual bool ShouldEventTriggerAnalysis
(
FPropertyChangedEvent& PropertyChangeEvent |
Returns true when the PropertyChangeEvent is due to update SoundWave or Settings. | AudioAnalyzerNRT.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FName GetAnalyzerNRTFactoryName() |
Subclasses must override this method in order to inform this object which AnalyzerNRTFactory to use for analysis | AudioAnalyzerNRT.h | |
void RemoveSettingsDelegate
(
UAudioAnalyzerNRTSettings* InSettings |
This removes the existing delegate handle from the current settings object | AudioAnalyzerNRT.h | |
void SetSettingsDelegate
(
UAudioAnalyzerNRTSettings* InSettings |
This sets the AnalyzeAudio callback to the delegate in settings. | AudioAnalyzerNRT.h |