Function CreateSoundAsync
-
CreateSoundAsync(
name: string,
source: string | string[] | ArrayBuffer | AudioBuffer | StaticSoundBuffer,
options?: Partial<IStaticSoundOptions>,
engine?: Nullable<AudioEngineV2>,
): Promise<StaticSound>Parameters
- name: string
The name of the sound.
- source: string | string[] | ArrayBuffer | AudioBuffer | StaticSoundBuffer
The source of the sound.
- options: Partial<IStaticSoundOptions> = {}
The options for the static sound.
- engine: Nullable<AudioEngineV2> = null
The audio engine.
Returns Promise<StaticSound>
A promise that resolves to the created static sound.
- name: string
Creates a new static sound.