When installing app: Error opening Primary Sound Capture Driver: "Bad format"


I don’t know if this has anything to do with JUCE, but it may, so I ask the question.

I have an app that uses juce_AudioDeviceSelectorComponent.

On windows when I run the Release or Debug versions either in vs 2017 or the .exe versions (guitarFineTune.exe) everything works fine.

BUT if I make an install package in vs 2017 (Windows Application Packaging Project Visual C++, which I must do to upload the app to Microsoft Store) then things get strange:

If I install the package on the PC where I develop the app and the run the installed app then I get the error message:
Error when trying to configure audio!
Error opening Primary Sound Capture Driver: “Bad format”
and I I go to the AudioDeviceSelector and select Windows Audio and/or Select another input device I get errors like
Error when trying to open audio device!
Couldn’t open the input device!

Further it looks like the app thinks it is running in a smartphone, because it is possible to disable the OS audio processing (I have a check box showing on the UI when that is possible).

The windows an JUCE versions are

Windows specifications
Edition Version Installed on OS build
Windows 10 Pro

JUCE: 5.3.1 (latest from GitHub)

I have uploaded the package to Microsoft Dev Center where it is in certification, so I don’t know what MS finds.

Maybe it is something you JUCE experts can clarify?

Best regards,


Could this have something to do with sandboxing somehow?

It turns out, that with this version of Windows you Must “Allow apps to access your microphone” in Privacy Settings.

(Further: In the “Windows Application Packaging Project Visual C++” you must NOT click on Microphone in Capabilities).

BTW: The error message from juce if you do not “Allow apps to access your microphone” in Privacy Settings is
Error opening Primary Sound Capture Driver: “Generic error”

Best regards,


@fabian it would be nice to have a somewhat meaningful error message in this dialog.