mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 01:35:45 +08:00
Graceful shutdown of SELCAL player with audio context
This commit is contained in:
committed by
Mat Sutcliffe
parent
87a9059a05
commit
dab907df8c
@@ -231,6 +231,7 @@ namespace BlackCore
|
|||||||
void CContextAudioBase::gracefulShutdown()
|
void CContextAudioBase::gracefulShutdown()
|
||||||
{
|
{
|
||||||
this->terminateVoiceClient();
|
this->terminateVoiceClient();
|
||||||
|
m_selcalPlayer->gracefulShutdown();
|
||||||
QObject::disconnect(this);
|
QObject::disconnect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ namespace BlackSound
|
|||||||
}
|
}
|
||||||
|
|
||||||
CSelcalPlayer::~CSelcalPlayer()
|
CSelcalPlayer::~CSelcalPlayer()
|
||||||
|
{
|
||||||
|
this->gracefulShutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSelcalPlayer::gracefulShutdown()
|
||||||
{
|
{
|
||||||
m_threadedPlayer.quitAndWait();
|
m_threadedPlayer.quitAndWait();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ namespace BlackSound
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CSelcalPlayer() override;
|
virtual ~CSelcalPlayer() override;
|
||||||
|
|
||||||
|
//! Stop the player thread
|
||||||
|
void gracefulShutdown();
|
||||||
|
|
||||||
//! Play SELCAL
|
//! Play SELCAL
|
||||||
//! \return Time of the played tone
|
//! \return Time of the played tone
|
||||||
BlackMisc::PhysicalQuantities::CTime play(int volume, const BlackMisc::Aviation::CSelcal &selcal);
|
BlackMisc::PhysicalQuantities::CTime play(int volume, const BlackMisc::Aviation::CSelcal &selcal);
|
||||||
|
|||||||
Reference in New Issue
Block a user