Can't record audio with SDL2 in macOS Catalina (and later)

When I try to record audio with SDL2 on macOS Catalina, all I get is silence. It works fine on Windows. It’s a program written in C.

I have a feeling this is related to permissions, as f.ex. Audacity asks for permission to use the microphone before recording, and that (obviously) works. However, when I open an audio input device in SDL2, it doesn’t ask for permission at all.

Is this a known issue? How do I solve this?

1 Like