I get the error Offset is outside the bounds of the DataView for the following code Here is the debug view in Chrome You can see that i is 47999 and the buffer size of my DataView is 48000. What am I missing here? Answer This is because an Int16Array has a 2 bytes per element. So its .length will
Tag: arraybuffer
Convert AudioBuffer to ArrayBuffer / Blob for WAV Download
I’d like to convert an AudioBuffer to a Blob so that I can create an ObjectURL from it and then download the audio file. Answer An AudioBuffer contains non-interleaved Float32Array PCM samples for each decoded audio channel. For a stereo AudioBuffer, it will contain 2 channels. Those channels need to be interleaved first, and then the interleaved PCM must have