refs #129 , modified voice context to enable notification sounds

This commit is contained in:
Klaus Basan
2014-02-10 23:30:02 +01:00
parent 4508864320
commit dbfd4a69e9
4 changed files with 28 additions and 1 deletions

View File

@@ -230,6 +230,15 @@ namespace BlackCore
BlackSound::CSoundGenerator::playSelcal(90, selcal, outputDevice);
}
/*
* Notification
*/
void CContextVoice::playNotification(uint notification) const
{
Q_ASSERT(this->m_voice);
BlackSound::CSoundGenerator::playNotificationSound(90, static_cast<BlackSound::CSoundGenerator::Notification>(notification));
}
/*
* Mic test.
*/
@@ -266,5 +275,4 @@ namespace BlackCore
return static_cast<double>(this->m_voice->inputSquelch());
}
} // namespace

View File

@@ -156,6 +156,11 @@ namespace BlackCore
*/
virtual void playSelcalTone(const BlackMisc::Aviation::CSelcal &selcal) const;
/*!
* \copydoc IContextVoice::playNotification()
*/
virtual void playNotification(uint notification) const;
/*!
* \copydoc IContextVoice::runMicrophoneTest()
*/

View File

@@ -152,6 +152,14 @@ namespace BlackCore
this->m_dBusInterface->callDBus(QLatin1Literal("playSelcalTone"), selcal);
}
/*
* Notification sound
*/
void IContextVoice::playNotification(uint notification) const
{
this->m_dBusInterface->callDBus(QLatin1Literal("playNotification"), notification);
}
/*
* MIC test
*/

View File

@@ -198,6 +198,12 @@ namespace BlackCore
*/
virtual void playSelcalTone(const BlackMisc::Aviation::CSelcal &selcal) const;
/*!
* \brief Play notification sound
* \param notification CSoundGenerator::Notification
*/
virtual void playNotification(uint notification) const;
/*!
* \brief Microphone test
*/