refs #371 remove deprecated mic and squelch tests

This commit is contained in:
Roland Winklmeier
2015-02-06 19:58:59 +01:00
committed by Klaus Basan
parent 984c0d084f
commit 1587b4791a
6 changed files with 7 additions and 114 deletions

View File

@@ -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;

View File

@@ -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
*/

View File

@@ -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;

View File

@@ -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<QString>(QLatin1Literal("getMicrophoneTestResult"));
}
/*
* Squelch value
*/
double CContextAudioProxy::getSquelchValue() const
{
return this->m_dBusInterface->callDBusRet<double>(QLatin1Literal("getSquelchValue"));
}
/*
* Volumes, by COM systems
*/

View File

@@ -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;

View File

@@ -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;