Audio Output Routing

I’m wondering if there’s a way for me to take the output of an edit into my own code, rather than have it go right out to audio devices? I saw HostedAudioDeviceInterface and thought it might be relevant, but it looks like this is more for the case where input audio needs to be manually fed in.

HostedAudioDeviceInterface is really only there when building the Engine in a plugin.
If you want to get output to your own code, the usual method is to create a Plugin subclass and add that to a track/master. You can then get at the audio stream and do what you want with it.

That makes sense, thanks!

So now I’m trying to go through some of the DeviceManager stuff, since part of my goal here is to route audio output to my own code so I don’t need to open output devices. I see there’s a function in EngineBehaviour that can be overridden to tell the device manager to not inititalize, but I suspect I may want access to audio input devices at some point later (though not output). It also seems like the arguments to DeviceManager::initialize that represent numbers of channels to open are more like suggestions/defaults than actually mandates. How should I go about interfacing with the device manager if this is my goal?

Hmm, in that case maybe you do want to use HostedAudioDeviceInterface version. See the EngineInPlugin example for how to use that.

That will mean you have to manage your own device.