Creates the component.
Optionalconfig: AudioSourceConfig
The component's configuration. Fields marked with DefineField take their values from
config, or its decorated fields keep their initial values.
OptionalactorThe actor that has this component. It is undefined until the component is
added to an actor.
Whether the audio plays automatically when the scene is entered or when the actor is added to the scene
Group of the audio, used to combine audio sources together and control them at once
Whether the audio is looped
Path to the audio asset
Volume of the audio, from 0 to 1
Returns the component of the same class on the parent actor.
The component, or undefined if the actor has no parent actor or
the parent has no such component.
Starts playback.
If the sound is already playing, it restarts from the beginning by
default; pass restart: false to leave an already-playing instance
untouched instead.
Whether to restart the sound if it's already playing.
Defaults to true.
Stops playback.
Plays a sound for an actor. Call
playandstop, or turn onautoplay.See
Audio