lichen-community-systems / Flocking

Flocking - Creative audio synthesis for the Web
GNU General Public License v2.0
695 stars 60 forks source link

Playground not working on iOS 9.3.1 #173

Closed hamoid closed 8 years ago

hamoid commented 8 years ago

I have tried on an iPad and the playground is silent.

I haven't checked the code, so I may be wrong, but sound should be enabled on "touchend". It seems to work by add this:

document.addEventListener("touchend", startMySound, false);

and in startMySound I both .init() and .start() Flocking.

colinbdclark commented 8 years ago

Yes, you're right. This definitely seems to be a regression in iOS at some point. Thanks for noting the workaround. I'll take a look!

colinbdclark commented 8 years ago

This appears to be due to two issues:

  1. Apple seems to have removed the stop() method from AudioBufferSourceNode, yet Flocking's iOS initialization strategy uses it.
  2. In the master branch (version 0.1.x is unaffected), an Infusion IoC reference to Flocking's ScriptProcessorNode instance is incorrect, causing it to be undefined when initializing on iOS.
colinbdclark commented 8 years ago

Fixes for this issue have been pushed to master and the 0.1.x branch. I've cut a minor 0.1.6 maintenance release from the 0.1.x branch. Upgrading should resolve the issue causing Flocking not to work on iOS.