I have this code that will add some arrayBuffer to an array.
let buffer = [];
fetch(dataURI)
.then( (res) => res.arrayBuffer() )
.then( (data) => {
buffer.push(data);
});
I need to convert the resulting array into a single Int16Array to process it, I'm trying with this code but with no success. I'm unable to get the single Int16Array I need
buffer.forEach( (item) => {
samples = [...Int16Array.from(item)];
});
Any suggestion on how I can proceed?