Routing audio channels

Hello,

is there a suitable way to route audio from an AudioSoucePlayer to physical outputs of an audio device? 

Essentially i've two players and i would like to be able to let the user route those two players to two diiferents couple of audio outputs.

I can actually list my outputs and assign them via :

 

        deviceManager.getAudioDeviceSetup(setup);

        setup.useDefaultOutputChannels = false;

        setup.outputChannels.clear();

        setup.outputChannels.setRange(outputChannelsList->getSelectedItemIndex(), 2, true);

        deviceManager.setAudioDeviceSetup(setup, true);

 

but this will affect both my players..I really would like to do some individual assignable routing.
Shall i better move to audioProcessor/AudioGraph approach ?

Thx
 

May be my question is too generic or unclear ? Any hint would be very appreciated.

Thx

 

It's a bit unclear.. Routing is really just a matter of copying the channel data into whichever destination channels you want it to go to (?)

Ok...Should I implement my own audioDeviceIOCallback ? I'm not actually streamin audio from input channels, but from an audio file.

Essentially which method should I implement to copy audio data to whichever destination channel ?

Hope to be clearer .

 

You could implement an i/o callback yourself.

Or maybe use ChannelRemappingAudioSource?

I'll check ChannelRemappingAudioSource. 

Thx

ChannelRemappingAudioSource was exactly what i was looking for, as simple as that. Thx Jules