Skip to content

Sound

class Sound : public SoundObject , public Resource , public Asset<AmSoundID>

Amplitude Sound Asset.

A Sound is the most basic sound object in Amplitude. It can be used to directly play an audio file, or can be contained in a SwitchContainer or a Collection for a fine-grained control.

Effects can be attached to a Sound, which will be applied to all instances of the sound in the Amplimix pipeline.

See
SwitchContainer, Collection, SoundObject

Functions

Name Description
IsStream Checks streaming is enabled for this Sound.
IsLoop Checks if looping is enabled for this Sound.
GetNearFieldGain Gets the near field effect gain of the sound object.

Function Details

GetNearFieldGain

[[nodiscard]] virtual const RtpcValue& GetNearFieldGain() const = 0

Gets the near field effect gain of the sound object.

Return
The sound object near field effect gain.

IsLoop

[[nodiscard]] virtual bool IsLoop() const = 0

Checks if looping is enabled for this Sound.

Return
true if looping is enabled, false otherwise.

IsStream

[[nodiscard]] virtual bool IsStream() const = 0

Checks streaming is enabled for this Sound.

Return
true if streaming is enabled, false otherwise.