Drop the thread from Qt audio loop. Makes exit cleaner.

Probably needs to be reworked or replaced with SDL it seems.
This commit is contained in:
Sacha committed 2014-08-21 03:46:00 +10:00
1 parent 2ba8e36b2b
commit 14d2fa9a39
2 files changed
+5 -14

No files matched your search

+2 -11
View File
@@ -162,21 +162,12 @@ static int mainInternal(QApplication &a)
SDL_CloseAudio();
}
}
// Audio must be unpaused _after_ NativeInit()
SDL_PauseAudio(0);
#else
QScopedPointer<QThread> thread(new QThread);
QScopedPointer<MainAudio> audio(new MainAudio());
audio->moveToThread(thread.data());
QObject::connect(thread.data(), SIGNAL(started()), audio.data(), SLOT(run()));
thread->start();
audio->run();
#endif
int ret = a.exec();
#ifndef QT_HAS_SDL
thread->terminate();
#endif
return ret;
return a.exec();
}
#ifndef QT_HAS_SDL