Optional
urls: ToneAudioBuffersUrlMapAn object literal or array of urls to load.
Optional
onload: (() => void)The callback to invoke when the buffers are loaded.
Optional
baseUrl: stringA prefix url to add before all the urls
Optional
options: Partial<ToneAudioBuffersOptions>A path which is prefixed before every url.
Set this debug flag to log all events that happen in this class.
Readonly
nameStatic
versionThe version number semver
Indicates if the instance was disposed. 'Disposing' an instance means that all of the Web Audio nodes that were created for the instance are disconnected and freed for garbage collection.
If the buffers are loaded or not
Add a buffer by name and url to the Buffers
A unique name to give the buffer
Either the url of the bufer, or a buffer which will be added with the given name.
The callback to invoke when the url is loaded.
Invoked if the buffer can't be loaded
Get a buffer by name. If an array was loaded, then use the array index.
The key or index of the buffer.
Static
get
A data structure for holding multiple buffers in a Map-like datastructure.
Example
Example