Audio flow for DSP

Hi there,

just working with juce for the first time. I am interested in audio signal processing, so I startet to create a gui that play an audio file from disc like in the demo. Then I added some filters and some graphical output - works.

I do this by creating a class that inherits from AudioIODeviceCallback and reimplement the audioDeviceIOCallback function. It trigger this callback by creating a reader for my file, creating a AudioFormatReaderSource and finally a transport source. This is added to a sourceplayer.

In audioDeviceIOCallback, I extract the output signal, do some signal processing with it, and write it back to the output channel.

But, what I really want to do is create an DSP. That means that I need the function audioDeviceIOCallback triggered and having the input channels carrying the signals entering die audiodevice, e.g, on the 'Line-in' wire. Then I would expect to be able to do the same signal processing and write the result to the output channels again.

Does anyone have a hint how to implent this in juce?

Sounds like a plugin is the answer to your prayers. Take a look at the Demo plugin and the Plugin host in the Juce samples.


I had a look around, but I really dont understand, how I can apply that to my problem.


Currently I am reimplementing the audioDeviceIOCallback function and add my function as callback to a source player. I extract the output channels, filter them, and write them back as output.

The only thing I would like to change is, that I connect my audioDeviceIOCallback to a different source. This source should deliver the input channels of the current audio device as input channel data, and what I write to output channel data should be played on the output of the current audio device, e.g., speakers or headphones.


Therefore I tried to use


Where, again, this is derived from AudioIODeviceCallback, but unfortunatly the callback is not called.


Any source I habe to add in there somehow?


If what you're trying to accomplish is not something entirely different from a normal plugin (i.e delay, eq, reverb, volume, compressor, limiter etc), then why don't you implement your DSP as a plugin?

The selection of input/output, audiodevices etc is done from the Plugin Host's menu so you don't have to care directly about audioDevices and audioDeviceIOCallbacks and stuff like that.

All you have to do is implement an AudioProcessor and do your DSP-stuff in its processBlock(). You connect the AudioProcessor/plugin in the Plugin Host as any other plugin.