Cryptonomicon Posted January 28, 2016 Share Posted January 28, 2016 I have a weird problem with sound. When I play various sounds both as loops and using markers everything works for a while and then stops. When I debug all the objects and trace into phaser it says everything is playing - but no sound is coming out. It primarily occurs on mobile in a cordova crosswalk wrapped app on Android- although once or twice I suspect it has occurred in the browser - cant be sure of that because I was debugging and and sometimes weird things happen with events when I move from the browser to the debugger. Does anyone have any idea where to start debugging or what could be wrong? I would like to get to the underlying object to see if it really is playing but AudioContext does not seem very useful Link to comment Share on other sites More sharing options...
Cryptonomicon Posted February 1, 2016 Author Share Posted February 1, 2016 Found the answer to this one myself after some fun putting in soundJS and then removing it again. It turns out there is a bug in chrome in which causes web audio to stop playing sounds if no sound has played for something like 30 seconds. https://code.google.com/p/chromium/issues/detail?id=518863 The fix seems to be to watch audioContext.currentTime and when it gets stuck after 30 secs create a new audioContext. rcoaxil 1 Link to comment Share on other sites More sharing options...
Recommended Posts