mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-09 02:56:01 +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()
|
||||
{
|
||||
this->terminateVoiceClient();
|
||||
m_selcalPlayer->gracefulShutdown();
|
||||
QObject::disconnect(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ namespace BlackSound
|
||||
}
|
||||
|
||||
CSelcalPlayer::~CSelcalPlayer()
|
||||
{
|
||||
this->gracefulShutdown();
|
||||
}
|
||||
|
||||
void CSelcalPlayer::gracefulShutdown()
|
||||
{
|
||||
m_threadedPlayer.quitAndWait();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ namespace BlackSound
|
||||
//! Destructor
|
||||
virtual ~CSelcalPlayer() override;
|
||||
|
||||
//! Stop the player thread
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Play SELCAL
|
||||
//! \return Time of the played tone
|
||||
BlackMisc::PhysicalQuantities::CTime play(int volume, const BlackMisc::Aviation::CSelcal &selcal);
|
||||
|
||||
Reference in New Issue
Block a user