# API Reference | UFMODAudioComponent

# 6. API Reference | UFMODAudioComponent

This class inherits from USceneComponent

Properties:

- UFMODAudioComponent::AttenuationDetails FMOD Custom Attenuation Details.
- UFMODAudioComponent::bApplyAmbientVolumes Whether we apply gain and low-pass based on audio zones.
- UFMODAudioComponent::bApplyOcclusionParameter Whether we apply gain and low-pass based on occlusion onto a parameter.
- UFMODAudioComponent::bAutoDestroy Auto destroy this component on completion.
- UFMODAudioComponent::bEnableTimelineCallbacks Enable timeline callbacks for this sound, so that OnTimelineMarker and OnTimelineBeat can be used.
- UFMODAudioComponent::bStopWhenOwnerDestroyed Stop sound when owner is destroyed.
- UFMODAudioComponent::Event The event asset to use for this sound.
- UFMODAudioComponent_EventCallback Generic callback used for the Studio Instance.
- UFMODAudioComponent::OcclusionDetails FMOD Custom Occlusion Details.
- UFMODAudioComponent::OnEventStopped Called when an event stops, either because it played to completion or because a Stop() call turned it off early.
- UFMODAudioComponent::OnSoundStopped Called when a sound stops.
- UFMODAudioComponent::OnTimelineBeat Called when we reach a beat of a tempo (if bEnableTimelineCallbacks is true).
- UFMODAudioComponent::OnTimelineMarker Called when we reach a named marker (if bEnableTimelineCallbacks is true).
- UFMODAudioComponent::ParameterCache Cache of the current Events parameters.
- UFMODAudioComponent::ProgrammerSoundName Sound name used for programmer sound.
- UFMODAudioComponent::StudioInstance Actual Studio instance handle.

Methods:

- UFMODAudioComponent::SetProgrammerSound Set a programmer sound to use for this audio component. Lifetime of sound must exceed that of the audio component.

BlueprintCallable Methods:

- Get Length Get the event length in milliseconds.
- Get Parameter Get parameter value from the Event.
- Get Parameter Value Get parameter value from the Event.
- Get Paused Get the paused state of the audio component.
- Get Property Get a property of the Event.
- Get Timeline Position Get the timeline position in milliseconds.
- Is Playing Return true if this component is currently playing an event.
- Key Off Allow an event to continue past a sustain point.
- Play Start a sound playing on an audio component.
- Release Release the current Studio Instance.
- Set Event New Event to be used by the FMODAudioComponent.
- Set Parameter Set a parameter of the Event.
- Set Paused Pause/Unpause an audio component.
- Set Pitch Set pitch on an audio component.
- Set Programmer Sound Name Set the sound name to use for programmer sound.
- Set Property Set a property of the Event.
- Set Timeline Position Set the timeline position in milliseconds
- Set Volume Set volume on an audio component.
- Stop Stop an audio component playing.

## UFMODAudioComponent::AttenuationDetails

FMOD Custom Attenuation Details.

C++

    struct FFMODAttenuationDetails AttenuationDetails;

See Also: FFMODAttenuationDetails

## UFMODAudioComponent::bApplyAmbientVolumes

Whether we apply gain and low-pass based on audio zones.

C++

    uint32 bApplyAmbientVolumes : 1;

## UFMODAudioComponent::bApplyOcclusionParameter

Whether we apply gain and low-pass based on occlusion onto a parameter.

C++

    uint32 bApplyOcclusionParameter : 1;

## UFMODAudioComponent::bAutoDestroy

Auto destroy this component on completion.

C++

    uint32 bAutoDestroy : 1;

## UFMODAudioComponent::bEnableTimelineCallbacks

Enable timeline callbacks for this sound, so that OnTimelineMarker and OnTimelineBeat can be used.

C++

    uint32 bEnableTimelineCallbacks : 1;

See Also: UFMODAudioComponent::OnTimelineMarker, UFMODAudioComponent::OnTimelineBeat

## UFMODAudioComponent::bStopWhenOwnerDestroyed

Stop sound when owner is destroyed.

C++

    uint32 bStopWhenOwnerDestroyed : 1;

## UFMODAudioComponent::Event

The event asset to use for this sound.

C++

    TAssetPtr<class UFMODEvent> Event;

See Also: UFMODEvent

## UFMODAudioComponent_EventCallback

Generic callback used for the Studio Instance.

C++

    FMOD_RESULT F_CALLBACK UFMODAudioComponent_EventCallback(
        FMOD_STUDIO_EVENT_CALLBACK_TYPE type,
        FMOD_STUDIO_EVENTINSTANCE *event,
        void *parameters
    );

type
  The type of callback being triggered.
event
  Reference to the Studio Instance.
parameters
  Information about the callback.

This is called if the UFMODAudioComponent::bEnableTimelineCallbacks is true or UFMODAudioComponent::ProgrammerSoundName is not empty.

See Also: FMOD_STUDIO_EVENT_CALLBACK_TYPE

## UFMODAudioComponent::OcclusionDetails

FMOD Custom Occlusion Details.

C++

    struct FFMODOcclusionDetails OcclusionDetails;

See Also: FFMODOcclusionDetails

## UFMODAudioComponent::OnEventStopped

Called when an event stops, either because it played to completion or because a Stop() call turned it off early.

C++

    FOnEventStopped OnEventStopped;

## UFMODAudioComponent::OnSoundStopped

Called when a sound stops.

C++

    FOnSoundStopped OnSoundStopped;

## UFMODAudioComponent::OnTimelineBeat

Called when we reach a beat of a tempo (if bEnableTimelineCallbacks is true).

C++

    FOnTimelineMarker OnTimelineBeat;

See Also: UFMODAudioComponent::bEnableTimelineCallbacks

## UFMODAudioComponent::OnTimelineMarker

Called when we reach a named marker (if bEnableTimelineCallbacks is true).

C++

    FOnTimelineMarker OnTimelineMarker;

See Also: UFMODAudioComponent::bEnableTimelineCallbacks

## UFMODAudioComponent::ParameterCache

Cache of the current Events parameters.

C++

    TMap<FName, float> ParameterCache;

## UFMODAudioComponent::ProgrammerSoundName

Sound name used for programmer sound.

C++

    FString ProgrammerSoundName;

The integration will look up the name in any loaded audio table.

## UFMODAudioComponent::SetProgrammerSound

Set a programmer sound to use for this audio component. Lifetime of sound must exceed that of the audio component.

C++

    void SetProgrammerSound(
      FMOD::Sound *Sound
    );

Sound
  User created sound to use.

See Also: FMOD::Sound

## UFMODAudioComponent::StudioInstance

Actual Studio instance handle.

C++

    FMOD::Studio::EventInstance *StudioInstance;