Recording audio from a second audio device manager

Hi all, I’ve talked about this with @daniel, but wondering if anyone else has a perspective?

I have a situation where I have one audio device manager - the input and output need to be allocated to one soundcard.

I need to record the output from this 1st soundcard into another place, so I added another device manager where I can select my other soundcard.

I’ve created a background thread, where I’m using an AudioDeviceIOCallback to record the audio.

In my main component (an AudioAppComponent), I’ve implemented both Audio Device Managers etc. Everything works fine, except my audio file plays at twice the speed!

So my assumption is that my audio recording background thread is being called at twice the rate, though I can’t spot anywhere this could be happening…

Daniel has suggested not using another audio device manager and rolling out my own AudioDeviceIOType by hand, but I feel I’d run into the same issue.

Any suggestions? Thanks for any help :slight_smile:

Sorry, that was a misunderstanding. You don’t roll your own AudioIODeviceType, but you use it to open more than one AudioIODevices in parallel.
I think the problem is, that the AudioDeviceManager has exactly one “currentDevice”.
I was assuming, that the problem is, that the AudioIODeviceCallback is added twice (and hence called twice, ending up with more samples than needed).

But maybe there is a way to have two devices managed in parallel by AudioDeviceManager?

I figured it out! When I set up the second AudioDeviceManager I had listed 0 max outputs. Even though I had 0 outputs, the manager still had the same output device that I had for my first manager, which contains 4 output channels. So I needed to put 2 max output channels and explicitly select “none” for my output device. Now it works like a dream (for now!) :wink: