Projucer: Adding sound to Animated and OpenGL Animation

It may not be clear to new users that sound is not immediately supported when creating a new “Animated Application” or “OpenGL Application”.

To make it easier for us new users, how about adding easy sound output functionality to those project types?

TBH I am no fan of AnimatedAppComponent nor the AudioAppComponent. They are handy, if you just hack a POC together. But the functionality each one adds, could be added by composition, so it is trivial to add a AudioSourcePlayer and an AudioDeviceManager to any MainComponent the Projucer created, which should be your preferred approach.
And it is also trivial to add a Timer to any Component calling an update() method on a model to drive the animation.

The fact that you struggled how to get both in one project is a clear indicator, that those classes are actually design flaws.

3 Likes