Input and output devices at different sample rates don't work in WASAPI mode


In the JUCE audio control panel with Windows Audio as the device type, if you select an input and output device that have different default sample rates (as set in Windows Playback and Recording devices / advanced properties) it resets the devices in the dialog so you can’t select these devices.

This is very common with WASAPI in Windows 10 since you can have the microphone set to 44.1 and the speaker set to 48K. In this scenario you will get no output in JUCE apps until you manually change the sample rates in Windows to match each other which is a rather cumbersome process.

Why is the audio devices code preventing this? The fact that a device has its DEFAULT sample rate set different across its inputs and outputs doesn’t mean that you cannot actually set its sample rates to match programmatically. In WASAPI you can set the device format for inputs and outputs as you want them to be so you could try and set the input devices to match the outputs format or vice versa if that didn’t work.