# Selecting a subset of channels from the input/output devices in GUI Application

**URL:** <https://forum.juce.com/t/selecting-a-subset-of-channels-from-the-input-output-devices-in-gui-application/44986>\
**Category:** General JUCE discussion\
**Created:** [March 13, 2021, 4:23pm UTC](https://forum.juce.com/t/selecting-a-subset-of-channels-from-the-input-output-devices-in-gui-application/44986 "2021-03-13T16:23:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbernardi](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gbernardi](https://forum.juce.com/u/gbernardi)\
**Post date:** [March 13, 2021, 4:23pm UTC](https://forum.juce.com/t/selecting-a-subset-of-channels-from-the-input-output-devices-in-gui-application/44986/1 "2021-03-13T16:23:38Z")

</div>

Hello Jucers,  
I’m tinkering with an example of JUCE’s GUI Application and having some trouble doing something that I assume should be doable. Say my app uses a 6-channel device as input and a 6-channel device as output. For both the input and output device, I was wondering if there’s a way to programmatically decide to enable only 5 of the 6 channels; more specifically, if I’d like to enable only channels 0,1,2,3,5 of both devices (i.e. skipping channel 4). Something like what I can manually do through the AudioDeviceSelectorComponent (the de-selected channels are Input and Output 5 in the image cause the numbering starts at 1)

 ![Screenshot 2021-03-13 at 17.06.38](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/4/41ff8294d07dadde076d7f3793314a829360e376.jpeg)

Considering `deviceManager` being an instance of `AudioDeviceManager` defined in `AudioAppComponent`, `currentAudioSetup` defined as follows

`AudioDeviceManager::AudioDeviceSetup currentAudioSetup;`

and since setting some fields of `currentAudioSetup` (`inputDeviceName`, `outputDeviceName`, `bufferSize`, `sampleRate`) like in the code below does work, I was hoping that assigning my channel configuration to the fields `inputChannels` and `outputChannels` of `currentAudioSetup`, i.e.

```
currentAudioSetup.inputDeviceName = "JUCE_in_device";
currentAudioSetup.outputDeviceName = "JUCE_out_device";
currentAudioSetup.bufferSize = currBuffSize;
currentAudioSetup.sampleRate = currSampleRate;
currentAudioSetup.inputChannels = 101111;
currentAudioSetup.outputChannels = 101111;
deviceManager.initialise (currInChannelNum, currOutChannelNum, nullptr , true , {} , &currentAudioSetup);

```

would work but it doesn’t seem to have an effect.  
Any idea of what I’m doing wrong?
