Simulate multiple channel inputs

I have an audio host application and I’m trying to debug an issue with a user who’s having issues with the audio channel input menu, saying he can only select input channels 1+2, however his motu 828 mk3 interface offer many different input channels.

I don’t have any devices that offer more than the standard 1+2 input channels, is there any software or any way I can simulate this properly so that I can debug / test / deploy / save the world?

Not sure about how to simulate the additional I/O. (Maybe you could create your own “dummy” AudioIODevice and AudioIODeviceType subclasses and register them into the AudioDeviceManager…?)

Are you using the AudioDeviceSelectorComponent, how are you constructing that? That has the parameters for maxAudioInputChannels and maxAudioOutputChannels.

I’ve created my own class but I’ve based myself heavily off of the AudioDeviceSelectorComponent. I’m sure this is just something wrong with my logic I just want to make sure I test properly before sending it to the user to validate.

Here is where I bind the menu:

void AudioSettingsView::bindaudioInputChannelsMenu(String deviceType)
{
    if (audioInputChannelsMenu != nullptr)
    {
        audioInputChannelsMenu->clear();

        if (auto* currentDevice = BcRepo::audioManager->deviceManager.getCurrentAudioDevice())
        {
            StringArray inputChannelNames = currentDevice->getInputChannelNames();
            
            int count = BcRepo::audioManager->deviceManager.getCurrentAudioDevice()->getActiveInputChannels().countNumberOfSetBits();
            int selection = 1;
            int selectedIndex = 0;
            
            for (int i = 0; i < inputChannelNames.size(); i += 2)
            {
                String name = inputChannelNames.size() <= i + 1 ?
                    inputChannelNames[i] :
                    getNameForChannelPair(inputChannelNames[i], inputChannelNames[i + 1]);

                audioInputChannelsMenu->addItem(name, selection++);

                if (i <= count)
                {
                    selectedIndex = selection - 2;
                }
            }

            audioInputChannelsMenu->setSelectedItemIndex(selectedIndex, false);
        }
    }
}

Here is where I build the audioDeviceSetup:

AudioDeviceManager::AudioDeviceSetup AudioSettingsView::buildAudioDeviceSetup()
{
    AudioDeviceManager::AudioDeviceSetup setup;
    setup.sampleRate        = samplerateMenu->getText().getDoubleValue();
    setup.bufferSize        = audioBufferMenu->getText().getIntValue();
    
    int outputSelection = audioOutputChannelsMenu->getSelectedItemIndex();
    setup.outputChannels.setRange(outputSelection * 2, 2, true);
    setup.useDefaultOutputChannels = false;

    int inputSelection = audioInputChannelsMenu->getSelectedItemIndex();
    setup.inputChannels.setRange(inputSelection * 2, 2, true);
    setup.useDefaultInputChannels = false;

    setup.outputDeviceName  = audioOutputSourceMenu->getText();
    setup.inputDeviceName   = audioInputSourceMenu->getText();
    
    return setup;
}