lichen-community-systems / Flocking

Flocking - Creative audio synthesis for the Web
GNU General Public License v2.0
699 stars 60 forks source link

flock.bufferLoader can crash the browser if it puts too much pressure on parallel audio decoding #148

Closed colinbdclark closed 8 years ago

colinbdclark commented 8 years ago

The current implementation of flock.bufferLoader attempts to load all its buffers at the same time, delegating to the browser to appropriately parallelize the decoding process. In practice, Chrome will crash if large numbers of large buffers are specified to a bufferLoader.

To be safe, flock.bufferLoader should sacrifice a certain amount of efficiency by loading its buffers sequentially, ensuring that the browser won't crash or become overloaded. In the future, parallel loading could be done more conservatively.

colinbdclark commented 8 years ago

Fixed in 7a07a6ae982d2aa6bdf57351a9a3d24c0887e805.