AudioProcessor class for standalone app

audio
#1

Hello !

I’m searching about how to activate the callback of the functions prepareToPlay (), processBlock (), and releaseSource () in the AudioProcessor class in a standalone audio app !
I found a lot of information about the AudioProcessor class for plugins but not so much for standalone app, so is it possible to use this class for standalone ?

I also look about how to dynamically add and remove busses…

Thanks

0 Likes

#2

It’s possible to use AudioProcessor in a standalone app, but I think the recommended way to do things these days is to start a plugin project with the standalone application builld option enabled. (That builds a small application wrapper that instantiates the AudioProcessor subclass that is also used for VST etc plugins.)

0 Likes

#3

Ok, thank you for your answer !

The difference between plugin and standalone is that for standalone there is no host, who manage the I/O (If I understand) so do you think I have to add an Audio Device Manager class to the plugin template ? And Audio Device Manager initialise the callbacks of audio process ?

Thanks

0 Likes

#4

No, you don’t need your own AudioDeviceManager instance or an AudioIODeviceCallback, the standalone application part in the plugin template deals with all that, you only need to implement the AudioProcessor subclass like you would for a plugin. The downside is that if you need to customize how the standalone application looks like and behaves, that is not very well explained anywhere.

If you decide to have your own custom standalone application with an AudioDeviceManager and an AudioIODeviceCallback, the corresponding methods are :

AudioProcessor::prepareToPlay : AudioIODeviceCallback::audioDeviceAboutToStart
AudioProcessor::releaseResources : AudioDeviceIOCallback::audioDeviceStopped
AudioProcessor::processBlock : AudioIODeviceCallback:: audioDeviceIOCallback

For the processBlock call you have to form an appropriate AudioBuffer from the arguments passed into the audioDeviceIOCallback method.

0 Likes