Use processBlock and audioDeviceIOCallback side by side

One of the DAWs we need to support is Adobe Audition. You can see here processBlock function never gets called in Adobe Audition I have posted my problem, that processBlock function does not get called from Adobe Audition and Fabian provided me with a workaround. Unfortunately, our customer didn’t like the workaround and wanted to be able to hear the audio out of the Plugin without any extra effort.
So we decided to create an output device selection combobox. In which the first item is using host audio, and the rest of the options are output devices found on user’s machine.
In all DAWs we select host audio by default, and in Adobe Audition we select default output device, so our user’s problem got solved.
But now we have this combobox that switching back and forth between host and system audio devices causes problem. As said, this is only the case when DAW’s IO buffer size is anything other than 512 (which is my default output device’s IO buffer size).