Navigation
Unreal Engine C++ API Reference > Runtime > MediaAssets
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- USynthComponent
- UMediaSoundComponent
References
Module | MediaAssets |
Header | /Engine/Source/Runtime/MediaAssets/Public/MediaSoundComponent.h |
Include | #include "MediaSoundComponent.h" |
Syntax
class UMediaSoundComponent : public USynthComponent
Remarks
Implements a sound component for playing a media player's audio output.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
EMediaSoundChannels | Channels | Media sound channel type. |
![]() |
bool | DynamicRateAdjustment | Dynamically adjust the sample rate if audio and media clock desynchronize. |
![]() |
TObjectPtr< UMediaPlayer > | MediaPlayer | The media player asset associated with this component. |
![]() |
float | RateAdjustmentFactor | Factor for calculating the sample rate adjustment. |
![]() |
FFloatRange | RateAdjustmentRange | The allowed range of dynamic rate adjustment. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UMediaSoundComponent
(
const FObjectInitializer& ObjectInitializer |
Create and initialize a new instance. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Virtual destructor. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | AddClockSink () |
Adds a clock sink so this can be ticked without the world. |
![]() |
bool | BP_GetAttenuationSettingsToApply
(
FSoundAttenuationSettings& OutAttenuationSettings |
Get the attenuation settings based on the current component settings. |
![]() ![]() |
void | ||
![]() ![]() |
float | Retrieves the current amplitude envelope. | |
![]() ![]() |
UMediaPlayer * | Get the media player that provides the audio samples. | |
![]() |
TArray< FMediaSoundComponentSpectralData > | Retrieves and normalizes the spectral data if spectral analysis is enabled. | |
![]() ![]() |
const FSoundAttenuationSettings * | Get the attenuation settings based on the current component settings. | |
![]() |
TArray< FMediaSoundComponentSpectralData > | Retrieves the spectral data if spectral analysis is enabled. | |
![]() |
void | Removes the clock sink. | |
![]() |
void | SetDefaultMediaPlayer
(
UMediaPlayer* NewMediaPlayer |
Set the component's default media player property. |
![]() |
void | SetEnableEnvelopeFollowing
(
bool bInEnvelopeFollowing |
Turns on amplitude envelope following the audio in the media sound component. |
![]() |
void | SetEnableSpectralAnalysis
(
bool bInSpectralAnalysisEnabled |
Turns on spectral analysis of the audio generated in the media sound component. |
![]() |
void | SetEnvelopeFollowingsettings
(
int32 AttackTimeMsec, |
Sets the envelope attack and release times (in ms). |
![]() |
void | SetMediaPlayer
(
UMediaPlayer* NewMediaPlayer |
Set the media player that provides the audio samples. |
![]() |
void | SetSpectralAnalysisSettings
(
TArray< float > InFrequenciesToAnalyze, |
Sets the settings to use for spectral analysis. |
![]() |
void | UpdatePlayer () |
Overridden from USynthComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
ISoundGeneratorPtr | CreateSoundGenerator
(
const FSoundGeneratorInitParams& InParams |
Implemented by the synth component to create a generator object instead of generating audio directly on the synth component. |
![]() ![]() |
USoundClass * | ||
![]() ![]() |
bool | Init
(
int32& SampleRate |
Called when synth is created. |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Activate
(
bool bReset |
Activates the SceneComponent, should be overridden by native child classes. |
![]() ![]() |
void | Deactivate () |
Deactivates the SceneComponent. |
![]() ![]() |
void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
![]() ![]() |
void | OnUnregister () |
Called when a component is unregistered. |
![]() ![]() |
void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |