Fixes to SDL audio renderer and autodetection support

This commit is contained in:
Cameron Gutman
2018-09-13 07:46:01 -07:00
parent 12496e4432
commit 64bc189010
7 changed files with 59 additions and 88 deletions

View File

@@ -279,7 +279,8 @@ Session::Session(NvComputer* computer, NvApp& app)
m_DisplayOriginY(0),
m_PendingWindowedTransition(false),
m_OpusDecoder(nullptr),
m_AudioRenderer(nullptr)
m_AudioRenderer(nullptr),
m_AudioRendererLock(0)
{
}
@@ -1110,6 +1111,9 @@ DispatchDeferredCleanup:
m_VideoDecoder = nullptr;
SDL_AtomicUnlock(&m_DecoderLock);
// Destroy the audio renderer which must also be done on the main thread
cleanupAudioRendererOnMainThread();
SDL_DestroyWindow(m_Window);
if (iconSurface != nullptr) {
SDL_FreeSurface(iconSurface);