`SDL_LockAudioStream` _sometimes_ hanging after `SDL_UnbindAudioStream`
Hey, I have a tough one to find and debug but I'm pretty sure it's real. I create a lot of audio streams using callbacks and upon finishing, I call `SDL_UnbindAudioStream` and sometimes later `SDL_DestroyAudioStream`. For bookkeeping I use Lock/UnlockAudioStream. Now _sometimes_, after `SDL_UnbindAudioStream` and before `SDL_DestroyAudioStream`, a call to `SDL_LockAudioStream` will never return. My app is single-threaded so the only thing running on another thread is the callback I guess. I am ready to answer any kind of questions, I double-checked my code but there could be issues of course, I also checked audiocvt.c and saw the "mutex nighmare" comments however the issue here is that it happens at a later point... If I don't call `SDL_UnbindAudioStream` everything is OK.
Source: libsdl-org/SDL