How to use multiple channels of audio hardware?


As in the title…I’ve tried :

				{0, AudioChannelSet::left},
				{1, AudioChannelSet::right},
				{2, AudioChannelSet::leftSurround},
				{3, AudioChannelSet::rightSurround},

But I am not sure if that is even close to correct to achieve it…


Surely the engine at least supports routing audio somehow to different hardware output channels, even if no explicit support for surround sound is available? Or how else would doing stereo headphone monitoring mixes or using external effects gear work…?


You shouldn’t need to use this at all. The DeviceManager is initialised with 512, 512 input/output channels by default.

I think you just need to enable the additional devices:

for (int i = 0; i < deviceManager.getNumWaveOutDevices(); ++)
    if (auto waveOutputDevice = deviceManager.getWaveOutDevice (i))
        waveOutputDevice->setEnabled (true);

Does that help?