- GUI : add a calibration button with feedback text

- Add echo calibration callbacks
- Start calibration and apply delay or turn off the echo cancellation in GUI
- Remove 'Core' prefix in QML
This commit is contained in:
Julien Wadel 2020-08-13 11:19:49 +02:00
parent 080b206e4a
commit 7cb4368a1d
20 changed files with 674 additions and 274 deletions

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="da">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Lydopkald i gang: Nogle indstillinger er ikke tilgængelige.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>Vil du downloade %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Audioanruf wird ausgeführt: Einige Einstellungen sind nicht verfügbar.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>Möchten Sie %1 (%2) herunterladen?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1215,6 +1215,31 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Audio call in progress: some settings are not available.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translatorcomment>Button title for the calibration of echo canceller</translatorcomment>
<translation>Calibration</translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translatorcomment>Message while calibrating</translatorcomment>
<translation>...calibrating...</translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translatorcomment>%1 is a placeholder for the number of ms obtained by the calibration. ms = milliseconds</translatorcomment>
<translation>Calibrated to -%1ms</translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translatorcomment>Message when the calibration cannot be done</translatorcomment>
<translation>Calibration failed</translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translatorcomment>Message when the calibration did not find any echo</translatorcomment>
<translation>No echo detected</translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="es">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Llamada de audio en curso: algunos ajustes no están disponibles.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<translation>¿Deseas descargar %1 (%1)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_FR" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr_FR">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Appel en cours: certains paramètres sont inaccessibles</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>Voulez-vous installer %1 (%2) ?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="hu">
<context>
<name>About</name>
<message>
@ -1212,6 +1214,26 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;</translation>
<source>audioSettingsInCallWarning</source>
<translation>Hanghívás folyamatban: egyes beállítások nem érhetők el.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2780,4 +2802,4 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;</translation>
<translation>Szeretné letölteni a(z) %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="it">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Chiamata audio in corso: alcune impostazioni non sono disponibili.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>Vuoi scaricare %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@
<source>audioSettingsInCallWarning</source>
<translation>音声通話中:一部の設定が使用できません</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@
<translation>%1 (%2) ?</translation>
</message>
</context>
</TS>
</TS>

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="pt_BR">
<context>
<name>About</name>
<message>
@ -1212,6 +1214,26 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;</translation>
<source>audioSettingsInCallWarning</source>
<translation>Chamada de áudio em andamento: algumas configurações não estão disponíveis.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2780,4 +2802,4 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;</translation>
<translation>Deseja transferir %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ru">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@
<source>audioSettingsInCallWarning</source>
<translation>Звуковой вызов в процессе: некоторые настройки недоступны.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@
<translation>Хотите загрузить %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="sv">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Ljudsamtal pågår: vissa inställningar är inte tillgängliga.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>Vill du hämta %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="tr">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioSettingsInCallWarning</source>
<translation>Sesli çağrı devam ediyor: bazı ayarlar kullanılamıyor.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<translation>%1 (%2) indirilmesini istiyor musunuz?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="uk">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@
<source>audioSettingsInCallWarning</source>
<translation>Прогрес аудіодзвінку: деякі настройки недоступні.</translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@
<translation>Бажаєте завантажити %1 (%2)?</translation>
</message>
</context>
</TS>
</TS>

View file

@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>About</name>
<message>
@ -1213,6 +1215,26 @@
<source>audioSettingsInCallWarning</source>
<translation></translation>
</message>
<message>
<source>echoCancellationCalibrationLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationInProgress</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationDone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationFailed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>calibratingEchoCancellationNone</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
@ -2781,4 +2803,4 @@
<translation> %1 (%2)</translation>
</message>
</context>
</TS>
</TS>

View file

@ -295,3 +295,10 @@ void CoreHandlers::onVersionUpdateCheckResultReceived (
Utils::coreStringToAppString(url)
);
}
void CoreHandlers::onEcCalibrationResult(
const std::shared_ptr<linphone::Core> &,
linphone::EcCalibratorStatus status,
int delayMs
) {
emit ecCalibrationResult(status, delayMs);
}

View file

@ -51,6 +51,7 @@ signals:
void messageReceived (const std::shared_ptr<linphone::ChatMessage> &message);
void presenceReceived (const QString &sipAddress, const std::shared_ptr<const linphone::PresenceModel> &presenceModel);
void registrationStateChanged (const std::shared_ptr<linphone::ProxyConfig> &proxyConfig, linphone::RegistrationState state);
void ecCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
private:
void handleCoreCreated ();
@ -146,12 +147,18 @@ private:
) override;
void onVersionUpdateCheckResultReceived (
const std::shared_ptr<linphone::Core> &,
const std::shared_ptr<linphone::Core> & core,
linphone::VersionUpdateCheckResult result,
const std::string &version,
const std::string &url
) override;
void onEcCalibrationResult(
const std::shared_ptr<linphone::Core> & core,
linphone::EcCalibratorStatus status,
int delayMs
) override;
// ---------------------------------------------------------------------------
bool mCoreCreated = false;

View file

@ -50,6 +50,9 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
this, &SettingsModel::handleCallCreated);
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::callStateChanged,
this, &SettingsModel::handleCallStateChanged);
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::ecCalibrationResult,
this, &SettingsModel::handleEcCalibrationResult);
configureRlsUri();
}
SettingsModel::~SettingsModel()
@ -335,6 +338,10 @@ void SettingsModel::setEchoCancellationEnabled (bool status) {
emit echoCancellationEnabledChanged(status);
}
void SettingsModel::startEchoCancellerCalibration(){
CoreManager::getInstance()->getCore()->startEchoCancellerCalibration();
}
// -----------------------------------------------------------------------------
bool SettingsModel::getShowAudioCodecs () const {
@ -1268,7 +1275,9 @@ void SettingsModel::handleCallCreated(const shared_ptr<linphone::Call> &) {
void SettingsModel::handleCallStateChanged(const shared_ptr<linphone::Call> &, linphone::Call::State) {
emit isInCallChanged(getIsInCall());
}
void SettingsModel::handleEcCalibrationResult(linphone::EcCalibratorStatus status, int delayMs){
emit echoCancellationStatus((int)status, delayMs);
}
bool SettingsModel::getIsInCall() const {
return CoreManager::getInstance()->getCore()->getCallsNb() != 0;
}

View file

@ -250,6 +250,8 @@ public:
bool getEchoCancellationEnabled () const;
void setEchoCancellationEnabled (bool status);
Q_INVOKABLE void startEchoCancellerCalibration();
bool getShowAudioCodecs () const;
void setShowAudioCodecs (bool status);
@ -335,8 +337,8 @@ public:
bool mandatoryMediaEncryptionEnabled () const;
void enableMandatoryMediaEncryption(bool mandatory);
bool getLimeState () const;
void setLimeState (const bool& state);
bool getLimeState () const;
void setLimeState (const bool& state);
bool getContactsEnabled () const;
void setContactsEnabled (bool status);
@ -449,6 +451,7 @@ public:
void handleCallCreated(const std::shared_ptr<linphone::Call> &call);
void handleCallStateChanged(const std::shared_ptr<linphone::Call> &call, linphone::Call::State state);
void handleEcCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
bool getIsInCall() const;
@ -485,6 +488,7 @@ signals:
void ringPathChanged (const QString &path);
void echoCancellationEnabledChanged (bool status);
void echoCancellationStatus(int status, int msDelay);
void showAudioCodecsChanged (bool status);

View file

@ -1,6 +1,6 @@
import QtQuick 2.7 as Core
import QtQuick.Controls 2.7 as Core
import QtQuick.Layouts 1.10 as Core
import QtQuick 2.7
import QtQuick.Controls 2.7
import QtQuick.Layouts 1.10
import Common 1.0
import Linphone 1.0
@ -11,7 +11,7 @@ import App.Styles 1.0
// =============================================================================
TabContainer {
Core.Column {
Column {
spacing: SettingsWindowStyle.forms.spacing
width: parent.width
@ -28,7 +28,7 @@ TabContainer {
visible: SettingsModel.isInCall
FormGroup {
Core.RowLayout {
RowLayout {
spacing: SettingsAudioStyle.warningMessage.iconSize
Icon {
icon: 'warning'
@ -38,7 +38,7 @@ TabContainer {
leftMargin: SettingsAudioStyle.warningMessage.iconSize
}
}
Core.Text {
Text {
text: qsTr('audioSettingsInCallWarning')
}
}
@ -70,10 +70,10 @@ TabContainer {
width: parent.width
enabled: !SettingsModel.isInCall
Core.Component.onCompleted: value = SettingsModel.playbackGain
Component.onCompleted: value = SettingsModel.playbackGain
onPositionChanged: SettingsModel.playbackGain = position
Core.ToolTip {
ToolTip {
parent: playbackSlider.handle
visible: playbackSlider.pressed
text: (playbackSlider.value * 100).toFixed(0) + " %"
@ -106,10 +106,10 @@ TabContainer {
width: parent.width
enabled: !SettingsModel.isInCall
Core.Component.onCompleted: value = SettingsModel.captureGain
Component.onCompleted: value = SettingsModel.captureGain
onPositionChanged: SettingsModel.captureGain = position
Core.ToolTip {
ToolTip {
parent: captureSlider.handle
visible: captureSlider.pressed
text: (captureSlider.value * 100).toFixed(0) + " %"
@ -124,7 +124,7 @@ TabContainer {
label: qsTr('audioTestLabel')
visible: !SettingsModel.isInCall
Core.Slider {
Slider {
id: audioTestSlider
enabled: false
@ -133,7 +133,7 @@ TabContainer {
leftMargin: SettingsAudioStyle.ringPlayer.leftMargin
}
background: Core.Rectangle {
background: Rectangle {
x: audioTestSlider.leftPadding
y: audioTestSlider.topPadding + audioTestSlider.availableHeight / 2 - height / 2
implicitWidth: 200
@ -143,7 +143,7 @@ TabContainer {
radius: 2
color: "#bdbebf"
Core.Rectangle {
Rectangle {
width: audioTestSlider.visualPosition * parent.width
height: parent.height
color: audioTestSlider.value > 0.8 ? "#ff0000" : "#21be2b"
@ -152,12 +152,12 @@ TabContainer {
}
//Empty slider handle
handle: Core.Text {
handle: Text {
text: ''
visible: false
}
Core.Timer {
Timer {
interval: 50
repeat: true
running: SettingsModel.captureGraphRunning
@ -226,7 +226,7 @@ TabContainer {
}
}
Core.Loader {
Loader {
id: ringPlayer
active: window.visible
@ -243,10 +243,50 @@ TabContainer {
FormGroup {
label: qsTr('echoCancellationLabel')
Switch {
checked: SettingsModel.echoCancellationEnabled
Row{
spacing: SettingsAudioStyle.warningMessage.iconSize
Switch {
checked: SettingsModel.echoCancellationEnabled
onClicked: SettingsModel.echoCancellationEnabled = !checked
onClicked: {
SettingsModel.echoCancellationEnabled = !checked
echoCalibrationStatus.text = ''
}
}
Text{
id:echoCalibrationStatus
text: ''
Layout.fillWidth:true
height:parent.height
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
TextButtonB {
id: echoCalibration
enabled: SettingsModel.echoCancellationEnabled
text: qsTr('echoCancellationCalibrationLabel')
onClicked: { echoCalibrationStatus.text = qsTr("calibratingEchoCancellationInProgress");//"...calibrating echo cancellation..."
SettingsModel.startEchoCancellerCalibration();
}
Connections {
target: SettingsModel
onEchoCancellationStatus:{
switch(status){
case 0 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationInProgress"); break;
case 1 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationDone").replace('%1', msDelay); break;//"Calibrated in -"+msDelay+"ms"
case 2 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationFailed"); break;//"Calibration failed"
case 3 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationNone");//"No echo detected"
SettingsModel.echoCancellationEnabled = false;// Calibration turn off the echo cancellation
break;
default:{}
}
}
}
}
}
}
}