AudioProcessor class for standalone app

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

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.)

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

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.

I’m trying to make a standalone app with an AudioProcessor and I’m having dificulties.

I used an AudioDeviceManager but it expects my AudioProcessor to have an input, otherwise it gives assertion errors.

I couldn’t find such plugin template that you mention.

Here’s my problem: How to play an audio processor without a plugin editor? - #7 by anoesisaudio

Is using the standalone app target that does all the work for you really of the Table?

I couldn’t find it, I don’t know what it means

When you create a new project select audio plugin. This project contains a build condifuration to create a dtandalone app