FAudioDevice::PlaySoundAtLocation

Plays a sound at the given location without creating an audio component.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/AudioDevice.h

Include

#include "AudioDevice.h"

Source

/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp

Syntax

void PlaySoundAtLocation
(
    USoundBase * Sound,
    UWorld * World,
    float VolumeMultiplier,
    float PitchMultiplier,
    float StartTime,
    const FVector & Location,
    const FRotator & Rotation,
    USoundAttenuation * AttenuationSettings,
    USoundConcurrency * ConcurrencySettings,
    const TArray< FAudioComponentParam > * Params,
    AActor * OwningActor
)

Remarks

Plays a sound at the given location without creating an audio component.

Parameters

Parameter

Description

Sound

The USoundBase to play at the location.

World

The world this sound is playing in.

VolumeMultiplier

The volume multiplier to set on the sound.

PitchMultiplier

The pitch multiplier to set on the sound.

StartTime

The initial time offset for the sound.

Location

The sound's position.

Rotation

The sound's rotation.

AttenuationSettings

The sound's attenuation settings to use (optional). Will default to the USoundBase's AttenuationSettings if not specified.

USoundConcurrency

The sound's sound concurrency settings to use (optional). Will use the USoundBase's USoundConcurrency if not specified.

Params

An optional list of audio component params to immediately apply to a sound.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss