1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

move audio class to thread before starting

This commit is contained in:
Nils Fenner 2015-11-14 21:50:32 +01:00
parent bb7d2a72b7
commit 1fb9bce78c
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C
2 changed files with 5 additions and 1 deletions

View File

@ -108,12 +108,13 @@ Start the audio thread for capture and playback.
*/
void Audio::startAudioThread()
{
moveToThread(audioThread);
if (!audioThread->isRunning())
audioThread->start();
else
qWarning("Audio thread already started -> ignored.");
moveToThread(audioThread);
}
/**

View File

@ -115,6 +115,9 @@ private:
private:
static Audio* instance;
private:
AudioPrivate* d;
private:
QThread* audioThread;
QMutex mAudioLock;