diff --git a/src/blackcore/context_voice.cpp b/src/blackcore/context_voice.cpp index 07d4faeee..7be46710d 100644 --- a/src/blackcore/context_voice.cpp +++ b/src/blackcore/context_voice.cpp @@ -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(notification)); + } + /* * Mic test. */ @@ -266,5 +275,4 @@ namespace BlackCore return static_cast(this->m_voice->inputSquelch()); } - } // namespace diff --git a/src/blackcore/context_voice.h b/src/blackcore/context_voice.h index a1b9dd602..040e09539 100644 --- a/src/blackcore/context_voice.h +++ b/src/blackcore/context_voice.h @@ -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() */ diff --git a/src/blackcore/context_voice_interface.cpp b/src/blackcore/context_voice_interface.cpp index 062920b95..f31b745db 100644 --- a/src/blackcore/context_voice_interface.cpp +++ b/src/blackcore/context_voice_interface.cpp @@ -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 */ diff --git a/src/blackcore/context_voice_interface.h b/src/blackcore/context_voice_interface.h index 49b18bbcd..ddb53f6ea 100644 --- a/src/blackcore/context_voice_interface.h +++ b/src/blackcore/context_voice_interface.h @@ -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 */