Thank you so much for your efforts with this!
Your time has been so greatly appreciated.
I feel bad telling you this because you so graciously put time into getting the BachTimeTrial to work (again, thank you!). However, I’m also so excited and grateful - because with your help (and the help of a few awesome others) I have figured out how to make the audio sync work rock solid with howler.js!!
I’ve been working with howler.js today and I’m so happy to report that I have it working FLAWLESSLY with not 3, but 6 perfectly synchronized audio files. It works in all browsers and all platforms (macOS and iOS), including iBooks on all devices! Exactly what I need.
I stripped it down to the simplest demo I could think of.
Here is how I have the working version configured:
In the first scene I have a single button that, upon clicking, switches to the next scene.
When the next scene loads (triggered with an On Scene Loads Action), I call a function that loads the sounds without playing them.
When the play button in the middle of the new scene is clicked, a separate function is triggered that plays the sounds.
With the sounds preloaded On Scene Load, and then button-triggered with a separate function, it works like a charm!
I included the demo here for anyone else that might come along looking for a synchronized audio playback solution (and now they actually have two different approaches, counting your working version!).
In the final version, I plan to have the music examples playable in multiple speeds for sight reading practice. So, the intro screen will present buttons for .5x, .75x or 1x speeds. Clicking one of these buttons would then load the scene that contains the audio for that chosen speed. So, it’s just nice that the format of needing at least two scenes to make it work is what I need anyway.
I am also so happy that it works so well with more than just three audio files playing back in perfect sync - this is huge for scalability to trios, quartets and more.
So, again, thanks so much for your help! Now, I’m going to download and examine your solution for the BachTimeTrial so that I can check out your solution in detail and learn from it.
All of that having been said, it sounds like the best news is that you all are getting some much needed rain in your area. Hoping the fires are all squashed and under control. All the best to you and yours!
soundSyncWithHowler(4sounds).zip (2.8 MB)