agamemnus Posted September 14, 2014 Share Posted September 14, 2014 For my Cordova-based game (target Android), I am using howler.js. The big advantage over Media is that I don't need to use the Media plugin, which breaks APK expansions that have audio files. It looks pretty popular, so likely most of you know about it, but I did have to modify it to add a preload buffer for large audio files. (a 5MB file takes several seconds to load and parse on my Note 2). A partial file buffer ("Range" request header -- implemented as ".buffersize" property) is enough for playing audio, but an actual partial file is needed where request headers don't work (ie: no server or virtual server), via ".bufferfile". Here are the links:Regular: https://github.com/goldfire/howler.js2.0 beta version: https://github.com/goldfire/howler.js/tree/2.0My fork with above-mentioned modifications: https://github.com/agamemnus/howler.js BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
agamemnus Posted September 15, 2014 Author Share Posted September 15, 2014 I recently discovered that most of the time (on Android) is spent actually decoding the data, not getting the array buffer... and one buffer is not enough. I'm now working on a greatly reduced version of howler.js (116 lines at the moment) in order to try to create smaller multiple buffers. Quote Link to comment Share on other sites More sharing options...
d13 Posted November 21, 2014 Share Posted November 21, 2014 I recently discovered that most of the time (on Android) is spent actually decoding the data, not getting the array buffer... and one buffer is not enough.That's really interesting.What do you think makes the buffers so big - are you using sound sprites? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.