diff --git a/src/blacksound/selcalplayer.cpp b/src/blacksound/selcalplayer.cpp index 9482b71f5..bb0d8ee47 100644 --- a/src/blacksound/selcalplayer.cpp +++ b/src/blacksound/selcalplayer.cpp @@ -18,9 +18,9 @@ namespace BlackSound { CSelcalPlayer::CSelcalPlayer(const CAudioDeviceInfo &device, QObject *parent) : QObject(parent), - m_threadedPlayer(this, "CSelcalPlayer", device) + m_threadedPlayer(new CThreadedTonePairPlayer(this, "CSelcalPlayer", device)) { - m_threadedPlayer.start(); + m_threadedPlayer->start(); } CSelcalPlayer::~CSelcalPlayer() @@ -30,7 +30,7 @@ namespace BlackSound void CSelcalPlayer::gracefulShutdown() { - m_threadedPlayer.quitAndWait(); + m_threadedPlayer->quitAndWait(); } CTime CSelcalPlayer::play(int volume, const CSelcal &selcal) @@ -46,7 +46,7 @@ namespace BlackSound const CTonePair t3(frequencies.at(2), frequencies.at(3), oneSec); QList tonePairs; tonePairs << t1 << t2 << t3; - m_threadedPlayer.play(volume, tonePairs); + m_threadedPlayer->play(volume, tonePairs); duration = oneSec * 2.5; } return duration; diff --git a/src/blacksound/selcalplayer.h b/src/blacksound/selcalplayer.h index 7888134cf..fc42cabde 100644 --- a/src/blacksound/selcalplayer.h +++ b/src/blacksound/selcalplayer.h @@ -40,7 +40,7 @@ namespace BlackSound BlackMisc::PhysicalQuantities::CTime play(int volume, const BlackMisc::Aviation::CSelcal &selcal); private: - CThreadedTonePairPlayer m_threadedPlayer; + CThreadedTonePairPlayer *m_threadedPlayer = nullptr; }; }