The community has reported that this seems to fix the crash. There are future plans to move all WASAPI operation
over to a single thread to make everything safer, but in the meantime while we wait for that to come online I'm
happy enough to use this hack instead.
CoUninitialize should only be called if we successfully initialized. S_OK and S_FALSE both mean that we need to
call CoUninitialize since the internal ref count was increased. RPC_E_CHANGED_MODE means that CoInitializeEx was
called with a different COINIT value, and we don't call CoUninitialize in that case. Other errors are possible,
so we check for S_OK and S_FALSE specifically.
*/
/* If ma_CoInitializeEx returns an error (such as 0x80010106 (RPC_E_CHANGED_MODE)), it may indicate that COM has already been initialized outside of miniaudio with a different thread concurrency model.
In this case, there is no need to call ma_CoUninitialize.*/