SDL_INIT_AUDIO hangs after every recompile

Windows 10, SDL 2.0.5. I’ve narrowed it down to a simple example. With only SDL_INIT_VIDEO the app starts up right away. If I add SDL_INIT_AUDIO, then the first time after a recompile the init hangs for 10 - 15 seconds. Every other time it starts up right away. Next recompile, 10 - 15 seconds.

Anyone else having this problem?

Windows Defender checking the exe maybe? Try whitelisting the file (or directory) to see if that makes a difference.

Boom! That was it. Thank you so much. It was getting really frustrating. Once the game is finished is this just something you live with or is there some way to prevent this from happening?

Out of curiousity, are you opening an audio device to record audio? I’m wondering why this only happens with SDL_INIT_AUDIO…maybe Windows doesn’t see a security risk with opening a window (obviously), but capturing audio could be suspicious? That’s so weird.

I am not doing any audio recording. It is a very simple app to try and pass my own data to the buffer from the sound callback. There isn’t anything weird that I can see.