"Failed to set the 'buffer' property on 'AudioBufferSourceNode'" Error
Sometimes code below raises an exception. It happens when I play one track after trying to play the next , after a short delay
var refreshBuffer = function(obj, loop, id) {
// determine which node to connect to
var node = obj._nodeById(id);
// setup the buffer source for playback
node.bufferSource = ctx.createBufferSource();
node.bufferSource.buffer = cache[obj._src]; // <== Here is an error:
//"Failed to set the 'buffer' property on 'AudioBufferSourceNode':
//The provided value is not of type 'AudioBuffer'."
node.bufferSource.connect(node.panner);
node.bufferSource.loop = loop[0];
if (loop[0]) {
node.bufferSource.loopStart = loop[1];
node.bufferSource.loopEnd = loop[1] + loop[2];
}
node.bufferSource.playbackRate.value = obj._rate;
};
}
My game's Error API Log picked this up with regards to this issue:
howler.js @ Line 1577 x 156 Afflicted Users Uncaught TypeError: Failed to set the 'buffer' property on 'AudioBufferSourceNode': The provided value is not of type 'AudioBuffer'.
mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 [26 Afflicted Users]
mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.18.2743.82 safari/537.36 [1 Afflicted Users]
mozilla/5.0 (windows nt 5.1) applewebkit/537.36 (khtml, like gecko) chrome/41.0.2272.104 aol/9.8 aolbuild/4346.13.us safari/537.36 [1 Afflicted Users]
mozilla/5.0 (windows nt 6.2; wow64) applewebkit/537.36 (khtml, like gecko) chrome/42.0.2311.90 tortuga/42.0.2311.96 safari/537.36 [1 Afflicted Users]
mozilla/5.0 (windows nt 6.1) applewebkit/537.36 (khtml, like gecko) chrome/41.0.2231.0 safari/537.36 [1 Afflicted Users]
Note that I'm using a slightly older custom version where the line number probably won't be the same as Git, but the User Agents might help you fix the bug.
Closing due to inactivity. If this is still an issue, reply with more info and I'll reopen.