diff --git a/src/blackcore/context_audio.h b/src/blackcore/context_audio.h index ea9a54428..9a671a700 100644 --- a/src/blackcore/context_audio.h +++ b/src/blackcore/context_audio.h @@ -79,8 +79,6 @@ namespace BlackCore virtual ~IContextAudio() {} signals: - //! \brief Audio test has been completed - void audioTestCompleted(); //! Voice rooms changed //! \details the flag indicates, whether a room got connected or disconnected @@ -168,18 +166,6 @@ namespace BlackCore */ virtual void playNotification(uint notification, bool considerSettings) const = 0; - //! Microphone test - virtual void runMicrophoneTest() = 0; - - //! Microphone test - virtual void runSquelchTest() = 0; - - //! Get the microphone test result - virtual QString getMicrophoneTestResult() const = 0; - - //! Get the squelch value - virtual double getSquelchValue() const = 0; - //! Enable audio loopback virtual void enableAudioLoopback(bool enable = true) = 0; diff --git a/src/blackcore/context_audio_impl.cpp b/src/blackcore/context_audio_impl.cpp index 5e2557c66..482cb2a26 100644 --- a/src/blackcore/context_audio_impl.cpp +++ b/src/blackcore/context_audio_impl.cpp @@ -434,42 +434,6 @@ namespace BlackCore CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds); } - /* - * Mic test. - */ - void CContextAudio::runMicrophoneTest() - { - Q_ASSERT(this->m_voice); - CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; - // Deprecated - } - - /* - * Squelch test. - */ - void CContextAudio::runSquelchTest() - { - CLogMessage(this).warning("This method is deprecated and will be removed soon"); - } - - /* - * Microphone test - */ - QString CContextAudio::getMicrophoneTestResult() const - { - CLogMessage(this).warning("This method is deprecated and will be removed soon"); - return QString(); - } - - /* - * Squelch value - */ - double CContextAudio::getSquelchValue() const - { - CLogMessage(this).warning("This method is deprecated and will be removed soon"); - return 0.0; - } - /* * Audio loopback */ diff --git a/src/blackcore/context_audio_impl.h b/src/blackcore/context_audio_impl.h index 4ff0674f3..440465478 100644 --- a/src/blackcore/context_audio_impl.h +++ b/src/blackcore/context_audio_impl.h @@ -99,18 +99,6 @@ namespace BlackCore //! \copydoc IContextAudio::playNotification() virtual void playNotification(uint notification, bool considerSettings) const override; - //! \copydoc IContextAudio::runMicrophoneTest() - virtual void runMicrophoneTest() override; - - //! \copydoc IContextAudio::runSquelchTest() - virtual void runSquelchTest() override; - - //! \copydoc IContextAudio::getMicrophoneTestResult() - virtual QString getMicrophoneTestResult() const override; - - //! \copydoc IContextAudio::getSquelchValue() - virtual double getSquelchValue() const override; - //! \copydoc IContextAudio::enableAudioLoopback() virtual void enableAudioLoopback(bool enable = true) override; diff --git a/src/blackcore/context_audio_proxy.cpp b/src/blackcore/context_audio_proxy.cpp index 0ac9f30dd..220607b45 100644 --- a/src/blackcore/context_audio_proxy.cpp +++ b/src/blackcore/context_audio_proxy.cpp @@ -33,9 +33,6 @@ namespace BlackCore void CContextAudioProxy::relaySignals(const QString &serviceName, QDBusConnection &connection) { bool s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(), - "audioTestCompleted", this, SIGNAL(audioTestCompleted())); - Q_ASSERT(s); - s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(), "changedVoiceRooms", this, SIGNAL(changedVoiceRooms(BlackMisc::Audio::CVoiceRoomList, bool))); Q_ASSERT(s); s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(), @@ -149,38 +146,6 @@ namespace BlackCore this->m_dBusInterface->callDBus(QLatin1Literal("playNotification"), notification, considerSettings); } - /* - * MIC test - */ - void CContextAudioProxy::runMicrophoneTest() - { - this->m_dBusInterface->callDBus(QLatin1Literal("runMicrophoneTest")); - } - - /* - * Mic test - */ - void CContextAudioProxy::runSquelchTest() - { - this->m_dBusInterface->callDBus(QLatin1Literal("runSquelchTest")); - } - - /* - * Test result - */ - QString CContextAudioProxy::getMicrophoneTestResult() const - { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getMicrophoneTestResult")); - } - - /* - * Squelch value - */ - double CContextAudioProxy::getSquelchValue() const - { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getSquelchValue")); - } - /* * Volumes, by COM systems */ diff --git a/src/blackcore/context_audio_proxy.h b/src/blackcore/context_audio_proxy.h index 794be4c55..4b7dbaaa1 100644 --- a/src/blackcore/context_audio_proxy.h +++ b/src/blackcore/context_audio_proxy.h @@ -102,18 +102,6 @@ namespace BlackCore //! \copydoc IContextAudio::playNotification virtual void playNotification(uint notification, bool considerSettings) const override; - //! \copydoc IContextAudio::runMicrophoneTest() - virtual void runMicrophoneTest() override; - - //! \copydoc IContextAudio::runSquelchTest() - virtual void runSquelchTest() override; - - //! \copydoc IContextAudio::getMicrophoneTestResult() - virtual QString getMicrophoneTestResult() const override; - - //! \copydoc IContextAudio::getSquelchValue() - virtual double getSquelchValue() const override; - //! \copydoc IContextAudio::enableAudioLoopback() virtual void enableAudioLoopback(bool enable = true) override; diff --git a/src/blackgui/components/audiosetupcomponent.cpp b/src/blackgui/components/audiosetupcomponent.cpp index befdb5fb4..21eea15ec 100644 --- a/src/blackgui/components/audiosetupcomponent.cpp +++ b/src/blackgui/components/audiosetupcomponent.cpp @@ -65,7 +65,7 @@ namespace BlackGui this->connect(this->ui->pb_SetupAudioSquelchTest, &QPushButton::clicked, this, &CAudioSetupComponent::ps_startAudioTest); // context - this->connect(this->getIContextAudio(), &IContextAudio::audioTestCompleted, this, &CAudioSetupComponent::ps_audioTestUpdate); +// this->connect(this->getIContextAudio(), &IContextAudio::audioTestCompleted, this, &CAudioSetupComponent::ps_audioTestUpdate); this->connect(this->getIContextAudio(), &IContextAudio::changedAudioDevices, this, &CAudioSetupComponent::ps_onAudioDevicesChanged); this->connect(this->getIContextAudio(), &IContextAudio::changedSelectedAudioDevices, this, &CAudioSetupComponent::ps_onCurrentAudioDevicesChanged); } @@ -134,13 +134,13 @@ namespace BlackGui if (sender == this->ui->pb_SetupAudioMicrophoneTest) { this->m_audioTestRunning = MicrophoneTest; - this->getIContextAudio()->runMicrophoneTest(); +// this->getIContextAudio()->runMicrophoneTest(); this->ui->pte_SetupAudioTestActionAndResult->appendPlainText("Speak normally for 5 seconds"); } else if (sender == this->ui->pb_SetupAudioSquelchTest) { this->m_audioTestRunning = SquelchTest; - this->getIContextAudio()->runSquelchTest(); +// this->getIContextAudio()->runSquelchTest(); this->ui->pte_SetupAudioTestActionAndResult->appendPlainText("Silence for 5 seconds"); } this->ui->prb_SetupAudioTestProgress->setVisible(true); @@ -174,12 +174,14 @@ namespace BlackGui this->ui->pte_SetupAudioTestActionAndResult->clear(); if (this->m_audioTestRunning == SquelchTest) { - double s = this->getIContextAudio()->getSquelchValue(); +// double s = this->getIContextAudio()->getSquelchValue(); + double s = 0.0; this->ui->pte_SetupAudioTestActionAndResult->appendPlainText(QString::number(s)); } else if (this->m_audioTestRunning == MicrophoneTest) { - QString m = this->getIContextAudio()->getMicrophoneTestResult(); +// QString m = this->getIContextAudio()->getMicrophoneTestResult(); + QString m; this->ui->pte_SetupAudioTestActionAndResult->appendPlainText(m); } this->m_audioTestRunning = NoAudioTest;