A Detour into Sound Management
The topic of playing music and sound FX has come up previously in our journey – the theme song sound is played as part of the Splash Screen that we built in Chapter 5, Adding a Cut Scene and Handling Input, after all. The sound plays just fine, and everything seems to work, so what need is there to make things more complicated for no apparent reason? This is an excellent point to raise because, in software, the best approaches tend to also be the simplest, and simple is good because it means fewer things can go wrong (by definition). When fewer things can go wrong in software, it’s easy and cheap to make changes, additions, and enhancements and that is good for both Engineering and Accounting – a two-for-one special!
What all of that is getting to is that even though it works fine in isolation to load and directly play the BABYLON.Sound
instance directly in the Screen itself, things break down when more than one Scene and Screen...