diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index b44bd58c1..802aca180 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -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); } /** diff --git a/src/audio/audio.h b/src/audio/audio.h index ef5df9d46..b00ec2e20 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -115,6 +115,9 @@ private: private: static Audio* instance; +private: + AudioPrivate* d; + private: QThread* audioThread; QMutex mAudioLock;