liorfrenkel Posted May 3, 2016 Share Posted May 3, 2016 Hey, the music for my game is 2:00 minutes long, when I wait for it to decode on the desktop in all browsers it is bearable, but with cordova + crosswalk it is much much longer, I tried using https://github.com/floatinghotpot/cordova-plugin-nativeaudio , but it doesn't work well for me, the sound on android is delayed much more than using the phaser sound, and it sometimes simply doesn't work... stuck etc. any advice on this subject? Thanks a lot! Link to comment Share on other sites More sharing options...
Tom Atom Posted May 3, 2016 Share Posted May 3, 2016 Hi, if your problem is with Android decoding, there was bug in Chromium for very long time: https://bugs.chromium.org/p/chromium/issues/detail?id=424174 What I did in my games was, that I downloaded sounds and some short menu music which is decoded in reasonable time. All ingame music is loaded in background with custom Phaser.Loader instance. Also word of warning with that Cordova plugin: do not use it for iOS version - it caused problems for me when suspending / resuming game (freezing). I the end I removed it also from Android version, but to be honest, I do not remember reason (but I think, there were some problems too - watch logcat) b10b 1 Link to comment Share on other sites More sharing options...
liorfrenkel Posted May 3, 2016 Author Share Posted May 3, 2016 OK thanks Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 3, 2016 Share Posted May 3, 2016 14 hours ago, liorfrenkel said: Hey, the music for my game is 2:00 minutes long, when I wait for it to decode on the desktop in all browsers it is bearable, but with cordova + crosswalk it is much much longer, I tried using https://github.com/floatinghotpot/cordova-plugin-nativeaudio , but it doesn't work well for me, the sound on android is delayed much more than using the phaser sound, and it sometimes simply doesn't work... stuck etc. any advice on this subject? Thanks a lot! Use the music a small bitrate and frequency Link to comment Share on other sites More sharing options...
icp Posted May 3, 2016 Share Posted May 3, 2016 You could try HowlerJS instead of Phaser's default sound manager. Link to comment Share on other sites More sharing options...
liorfrenkel Posted May 4, 2016 Author Share Posted May 4, 2016 11 hours ago, icp said: You could try HowlerJS instead of Phaser's default sound manager. does it decode faster than phaser's? I actually managed to use the cordova plugin I mentioned before and by changing the encoding method I used for my mp3 (https://www.freac.org/), and not using the plugin's "preloadSimple" function, the problem was solved, at least on android, haven't checked on ios yet. thanks! Link to comment Share on other sites More sharing options...
icp Posted May 4, 2016 Share Posted May 4, 2016 13 hours ago, liorfrenkel said: does it decode faster than phaser's? I actually managed to use the cordova plugin I mentioned before and by changing the encoding method I used for my mp3 (https://www.freac.org/), and not using the plugin's "preloadSimple" function, the problem was solved, at least on android, haven't checked on ios yet. thanks! Yes. liorfrenkel 1 Link to comment Share on other sites More sharing options...
Recommended Posts