From 6bbd944b6ae70428e87b32d452dd2987217f685a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 5 Dec 2013 10:21:30 -0800 Subject: [PATCH] wait for audio thread to quit on application exit --- interface/src/Application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7e098085e8..1a61f5b08f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -241,6 +241,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : } Application::~Application() { + // ask the audio thread to quit and wait until it is done + _audio.thread()->quit(); + _audio.thread()->wait(); + storeSizeAndPosition(); NodeList::getInstance()->removeHook(&_voxels); NodeList::getInstance()->removeHook(this);