import Buffer from '@mobilizing/library/js/Mobilizing/renderer/audio/Buffer.js'
Buffer
Constructor Summary
Public Constructor | ||
public | constructor(params: Object) Buffer Class. |
Member Summary
Public Members | ||
public | arrayBuffer: * | |
public | ||
public | ||
public | renderer: * |
Method Summary
Public Methods | ||
public | Return the underlying WebAudio audio buffer |
Public Constructors
public constructor(params: Object) source
Buffer Class. Encapsulates the concept of buffer of Audio data. You can load, depending on the platform, various audio file formats, like WAV, MP3 or OGG. See the Web Audio API documentation. Requires the Web Audio API.
Params:
Name | Type | Attribute | Description |
params | Object | the parameters object | |
params.renderer | RendererAudio |
| The audio renderer |
params.arrayBuffer | ArrayBuffer | the raw arraybuffer, already loaded, to give to the audio context | |
params.decodedCallback | Function | the callback function to call when Audio Context has decoded the sound file's raw arrayBuffer |