UE4 Integration 2.00
This documentation is preliminary and is subject to change.
This class inherits from USceneComponent
Defines:
Properties:
Public:
Private:
Methods:
Public:
Private:
Activates the component.
virtual void Activate(
bool bReset = false
);
Calculated Ambient LPF level for that frame.
float AmbientLPF;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Stored ID of the LPF parameter of the Event (if applicable).
FMOD_STUDIO_PARAMETER_ID AmbientLPFID;
See Also: Ambient Zones, FMOD_STUDIO_PARAMETER_ID
Calculated Ambient volume level for that frame.
float AmbientVolume;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Stored ID of the Volume parameter of the Event (if applicable).
FMOD_STUDIO_PARAMETER_ID AmbientVolumeID;
See Also: Ambient Zones, FMOD_STUDIO_PARAMETER_ID
Apply Volume and LPF to Event.
void ApplyVolumeLPF();
FMOD Custom Attenuation Details.
struct FFMODAttenuationDetails AttenuationDetails;
See Also: FFMODAttenuationDetails
Whether we apply gain and low-pass based on audio zones.
uint32 bApplyAmbientVolumes : 1;
Whether we apply gain and low-pass based on occlusion onto a parameter.
uint32 bApplyOcclusionParameter : 1;
Auto destroy this component on completion.
uint32 bAutoDestroy : 1;
Have the Event parameters default values been cached.
bool bDefaultParameterValuesCached;
Enable timeline callbacks for this sound, so that OnTimelineMarker and OnTimelineBeat can be used.
uint32 bEnableTimelineCallbacks : 1;
See Also: UFMODAudioComponent::OnTimelineMarker, UFMODAudioComponent::OnTimelineBeat
Stop sound when owner is destroyed.
uint32 bStopWhenOwnerDestroyed : 1;
Cache default event parameter values
void CacheDefaultParameterValues()
Stores the Timeline Beats as they are triggered.
TArray<FTimelineBeatProperties> CallbackBeatQueue;
See Also: UFMODAudioComponent::EventCallbackAddBeat
A scope lock used specifically for callbacks.
FCriticalSection CallbackLock;
Stores the Timeline Markers as they are triggered.
TArray<FTimelineMarkerProperties> CallbackMarkerQueue;
See Also: UFMODAudioComponent::EventCallbackAddMarker
Previous interior LPF value.
float CurrentInteriorLPF;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Current interior volume value.
float CurrentInteriorVolume;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Deactivates the SceneComponent.
virtual void Deactivate();
Overridable function called whenever this actor is being removed from a level.
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
The event asset to use for this sound.
TAssetPtr<class UFMODEvent> Event;
See Also: UFMODEvent
Generic callback used for the Studio Instance.
FMOD_RESULT F_CALLBACK UFMODAudioComponent_EventCallback(
FMOD_STUDIO_EVENT_CALLBACK_TYPE type,
FMOD_STUDIO_EVENTINSTANCE *event, void *parameters
);
This is on set on the UFMODAudioComponent::StudioInstance if UFMODAudioComponent::bEnableTimelineCallbacks is true or UFMODAudioComponent::ProgrammerSoundName is not empty.
See Also: FMOD_STUDIO_EVENT_CALLBACK_TYPE, UFMODAudioComponent::EventCallbackAddMarker, UFMODAudioComponent::EventCallbackAddBeat, UFMODAudioComponent::EventCallbackCreateProgrammerSound, UFMODAudioComponent::EventCallbackDestroyProgrammerSound
Timeline Beat callback.
void EventCallbackAddBeat(
struct FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES *props
);
See Also: UFMODAudioComponent_EventCallback, FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES
Timeline Marker callback.
void EventCallbackAddMarker(
struct FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES *props
);
See Also: UFMODAudioComponent_EventCallback, FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES
Programmer Sound Create callback.
void EventCallbackCreateProgrammerSound(
struct FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES *props
);
See Also: UFMODAudioComponent_EventCallback, FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
Programmer Sound Destroy callback.
void EventCallbackDestroyProgrammerSound(
struct FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES *props
);
See Also: UFMODAudioComponent_EventCallback, FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
The length of the current Event in milliseconds.
int32 EventLength;
Get the event length in milliseconds.
int32 GetLength() const;
Get parameter value from the Event.
float GetParameter(
FName Name
);
Get a property of the Event.
float GetProperty(
EFMODEventProperty::Type Property
);
See Also: EFMODEventProperty
Return a cached reference to the current IFMODStudioModule.
IFMODStudioModule& GetStudioModule();
See Also: IFMODStudioModule
Get the timeline position in milliseconds.
int32 GetTimelinePosition();
Timer used for volumes fading in and out.
double InteriorLastUpdateTime;
Return true if this component is currently playing an event.
bool IsPlaying();
Previously set LPF value.
float LastLPF;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Previously set Volume value.
float LastVolume;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Stored reference to the current IFMODStudioModule.
IFMODStudioModule* Module;
See Also: IFMODStudioModule
FMOD Custom Occlusion Details.
struct FFMODOcclusionDetails OcclusionDetails;
See Also: FFMODOcclusionDetails
Stored ID of the Occlusion parameter of the Event (if applicable).
FMOD_STUDIO_PARAMETER_ID OcclusionID;
See Also: Occlusion, FMOD_STUDIO_PARAMETER_ID
Called when an event stops, either because it played to completion or because a Stop() call turned it off early.
FOnEventStopped OnEventStopped;
Called when the event has finished stopping.
void OnPlaybackCompleted();
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.
virtual void OnRegister();
Called when we reach a beat of a tempo (if bEnableTimelineCallbacks is true).
FOnTimelineMarker OnTimelineBeat;
See Also: UFMODAudioComponent::bEnableTimelineCallbacks
Called when we reach a named marker (if bEnableTimelineCallbacks is true).
FOnTimelineMarker OnTimelineMarker;
See Also: UFMODAudioComponent::bEnableTimelineCallbacks
Called when a component is unregistered. Called after DestroyRenderState_Concurrent and OnDestroyPhysicsState are called.
virtual void OnUnregister();
Native callback when this component is moved.
virtual void OnUpdateTransform(
EUpdateTransformFlags UpdateTransformFlags,
ETeleportType Teleport = ETeleportType::None
);
Used to update the 3D positional information of the Event.
Cache of the current Events parameters.
TMap<FName, float> ParameterCache;
Start a sound playing on an audio component.
void Play();
Internal play function which can play Events in the editor.
void PlayInternal(
EFMODSystemContext::Type Context
);
See Also: EFMODSystemContext
Direct assignment of programmer sound from other C++ code.
FMOD::Sound *ProgrammerSound;
See Also: FMOD::Sound
Sound name used for programmer sound.
FString ProgrammerSoundName;
The integration will look up the name in any loaded audio table.
Release the current Studio Instance.
void Release();
See Also: UFMODAudioComponent::StudioInstance
Release any cached parameters then the Studio Instance.
void ReleaseEventCache();
See Also: UFMODAudioComponent::StudioInstance
Release the Studio Instance.
void ReleaseEventInstance();
See Also: UFMODAudioComponent::StudioInstance
New Event to be used by the FMODAudioComponent.
void SetEvent(
UFMODEvent *NewEvent
);
If an Event is currently playing, it will be stopped and the new Event passed in will be started.
See Also: UFMODEvent
Set a parameter of the Event.
void SetParameter(
FName Name,
float Value
);
Pause/Unpause an audio component.
void SetPaused(
bool paused
);
Set pitch on an audio component.
void SetPitch(
float pitch
);
The pitch multiplier is used to modulate the event instance's pitch. It can be set to any value greater than or equal to zero but the final combined pitch is clamped to the range [0, 100] before being applied.
Set a programmer sound to use for this audio component. Lifetime of sound must exceed that of the audio component.
void SetProgrammerSound(
FMOD::Sound *Sound
);
See Als: FMOD::Sound
Set the sound name to use for programmer sound.
void SetProgrammerSoundName(
FString Value
);
The integration will look up the name in any loaded audio table.
Set a property of the Event.
void SetProperty(
EFMODEventProperty::Type Property,
float Value
);
See Also: EFMODEventProperty
Set the timeline position in milliseconds
void SetTimelinePosition(
int32 Time
);
Set volume on an audio component.
void SetVolume(
float volume
);
This volume is applied as a scaling factor for the event volume. It does not override the volume level set in FMOD Studio, nor any internal volume automation or modulation.
Previous interior LPF value.
float SourceInteriorLPF;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Previous interior volume value.
float SourceInteriorVolume;
Used for automating volume and/or LPF with Ambient Zones.
See Also: Ambient Zones
Stop an audio component playing.
void Stop();
Stored properties to apply next time we create an instance.
float StoredProperties[EFMODEventProperty::Count];
See Also: EFMODEventProperty
Actual Studio instance handle.
FMOD::Studio::EventInstance *StudioInstance;
Function called every frame on this ActorComponent.
virtual void TickComponent(
float DeltaTime,
enum ELevelTick TickType,
FActorComponentTickFunction *ThisTickFunction
);
Only executes if the component is registered, and also PrimaryComponentTick.bCanEverTick must be set to true.
Trigger a cue in an event.
void TriggerCue();
Update attenuation if we have it set.
void UpdateAttenuation();
Update gain and low-pass based on interior volumes.
void UpdateInteriorVolumes();
Was the object occluded in the previous frame.
bool wasOccluded;
See Also: Occlusion