Record output of multiple AudioSourcePlayer objects/instances

Hi,

I want to be able to capture the output of multiple AudioSourcePlayer objects into an audio file (wav).

I have a set of audio files that are being played back via AudioSourcePlayer each with a different gain value.

I want to do two things… 1) hear the output via the AudioDeviceManager’s output 2) Record the output of what is being played out the outputs.

I’m not sure if there is a simple trick to hook into the AudioIODeviceCallback to get the outputs or if I need to create some type of aggregate AudioSourcePlayer and hook into the single audioDeviceIOCallback.

Thoughts?

Thanks,
Bob

If you want your sources mixed, it’s probably a better idea to put the audio file sources into a MixerAudioSource instead of adding multiple AudioSourcePlayers into the AudioDeviceManager.

For the recording of the output of the MixerAudioSource, you may need to write a custom AudioSource that passes through the audio but handles writing the audio into the destination file.

Something like this :
graphviz%20(2)

Xenakios,

Thanks for the reply. I was thinking something like this but I wasn’t sure if I was missing something built into Juce for doing this for me.

I’m glad for the confirmation it is the right direction.

bob