refs #320 Remove deprecated code

* Mic and squelch tests
* VoiceVatlib threading
* Exception handling
This commit is contained in:
Roland Winklmeier
2014-12-25 16:19:22 +01:00
parent cb7ad005b0
commit 111c539e89
10 changed files with 9 additions and 503 deletions

View File

@@ -35,18 +35,11 @@ namespace BlackCore
m_voice(new CVoiceVatlib())
{
// 1. Init by "voice driver"
m_voice->moveToThread(&m_threadVoice);
m_threadVoice.start();
// 2. Register PTT hotkey function
CVoiceVatlib *voice = m_voice.data();
m_inputManager = CInputManager::getInstance();
m_handlePtt = m_inputManager->registerHotkeyFunc(CHotkeyFunction::Ptt(), voice, &CVoiceVatlib::handlePushToTalk);
// 3. Signal / slots
connect(voice, &CVoiceVatlib::micTestFinished, this, &CContextAudio::audioTestCompleted);
connect(voice, &CVoiceVatlib::squelchTestFinished, this, &CContextAudio::audioTestCompleted);
m_channelCom1 = m_voice->getVoiceChannel(0);
m_channelCom1->setMyAircraftCallsign(getIContextOwnAircraft()->getOwnAircraft().getCallsign());
connect(m_channelCom1.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_com1ConnectionStatusChanged);
@@ -64,8 +57,6 @@ namespace BlackCore
CContextAudio::~CContextAudio()
{
this->leaveAllVoiceRooms();
m_threadVoice.quit();
m_threadVoice.wait(1000);
}
/*
@@ -380,7 +371,7 @@ namespace BlackCore
{
Q_ASSERT(this->m_voice);
CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
this->m_voice->runMicrophoneTest();
// Deprecated
}
/*
@@ -388,9 +379,7 @@ namespace BlackCore
*/
void CContextAudio::runSquelchTest()
{
Q_ASSERT(this->m_voice);
CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
this->m_voice->runSquelchTest();
CLogMessage(this).warning("This method is deprecated and will be removed soon");
}
/*
@@ -398,9 +387,8 @@ namespace BlackCore
*/
QString CContextAudio::getMicrophoneTestResult() const
{
Q_ASSERT(this->m_voice);
CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
return this->m_voice->micTestResultAsString();
CLogMessage(this).warning("This method is deprecated and will be removed soon");
return QString();
}
/*
@@ -408,9 +396,8 @@ namespace BlackCore
*/
double CContextAudio::getSquelchValue() const
{
Q_ASSERT(this->m_voice);
CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
return static_cast<double>(this->m_voice->inputSquelch());
CLogMessage(this).warning("This method is deprecated and will be removed soon");
return 0.0;
}
/*