Class: AudioAsset
AudioAsset represents an in-memory audio asset that has been loaded/attempted to be loaded. Stores meta info around the audio, such as a name, the success of the audio being loaded, and any errors from loading it. Also stores the audio data itself.
Table of contents
Constructors
Properties
Constructors
constructor
+ new AudioAsset(name
: string, buffer
: AudioBuffer, error?
: Error): AudioAsset
Parameters:
Name | Type |
---|---|
name |
string |
buffer |
AudioBuffer |
error? |
Error |
Returns: AudioAsset
Properties
buffer
• buffer: AudioBuffer
The data of the audio.
error
• Optional
error: undefined | Error
An optional field, contains any error from loading the audio, if there is none it will be undefined.
name
• name: string
Name of the audio asset, how it is referred to throughout the system, should be unique.
MESSAGE_FINISH_LOAD
▪ Readonly
Static
MESSAGE_FINISH_LOAD: finish_audio_load= "finish_audio_load"
Message when an audio asset is finished loading.