You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We ran into a performance issue with howler. It was grinding the UI Thread to a halt. It was caused by the fact that you only allow sounds to be loaded via dataURI or XHR. We preload all our assets in a worker thread after which we have access to the DataURI and ArrayBuffer. The problem came when we passed in the dataURI there's a loop which converts it to Uint8Array in the loadBuffer method, it then passes the buffer into decodeAudioData. We found the loop was killing us and was unnecessary since we already had access to the ArrayBuffer data with no way to inject it into Howler.
Our Solution was to hack Howler and modify the loadBuffer method to include the following:
We don't want to maintain this hack and would greatly appreciate it if howler could be changed slightly to allow the src to be set to a third type of data, an ArrayBuffer. This way anyone can choose to preload sound however the wish and then inject it into howler.
The text was updated successfully, but these errors were encountered:
We ran into a performance issue with howler. It was grinding the UI Thread to a halt. It was caused by the fact that you only allow sounds to be loaded via dataURI or XHR. We preload all our assets in a worker thread after which we have access to the DataURI and ArrayBuffer. The problem came when we passed in the dataURI there's a loop which converts it to
Uint8Array
in theloadBuffer
method, it then passes the buffer intodecodeAudioData
. We found the loop was killing us and was unnecessary since we already had access to the ArrayBuffer data with no way to inject it into Howler.Our Solution was to hack Howler and modify the
loadBuffer
method to include the following:Then all we had to do was set the
src
,format
andbuffer
props and then callload()
.We don't want to maintain this hack and would greatly appreciate it if howler could be changed slightly to allow the
src
to be set to a third type of data, an ArrayBuffer. This way anyone can choose to preload sound however the wish and then inject it into howler.The text was updated successfully, but these errors were encountered: