mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #129 , modified voice context to enable notification sounds
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user