Playing an AudioSource


Hey folks,

I'm just learning how to use JUCE and was wondering how I go about playing data generated from an AudioSource class instance.

The application I initially created is just a window displaying the "Hello World" message - and I've added another class that derives from AudioSource and generates white noise.

Do I need to create an instance of the AudioAppComponent (so I can set the number of channels I'm using etc), or can I just create an AudioSourcePlayer and feed it my AudioSource instance?



Sure, you can create an AudioDeviceManager + AudioSourcePlayer and use that. The AudioAppComponent is just a handy class that does all this for you, so you might want to look inside it at what it does (it contains very little code)


Excellent - thanks!