wait for audio thread to quit on application exit

This commit is contained in:
Stephen Birarda 2013-12-05 10:21:30 -08:00
parent 0e3cb11863
commit 6bbd944b6a

View file

@ -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);