Jump to content

Howler.js...


agamemnus
 Share

Recommended Posts

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.js

2.0 beta version: https://github.com/goldfire/howler.js/tree/2.0

My fork with above-mentioned modifications: https://github.com/agamemnus/howler.js

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...