I get the error Offset is outside the bounds of the DataView for the following code
let data = [...] // some array of Int16
let buf = new ArrayBuffer(data.length);
let dataView = new DataView(buf);
data.forEach((b, i) => {
dataView.setInt16(i, b);
});
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?
