Commit 7ea31e5b authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Settings/SettingsAudio): supports echo cancellation

parent 576a7564
......@@ -685,6 +685,10 @@ Server url not configured.</translation>
<source>ringLabel</source>
<translation>Ring</translation>
</message>
<message>
<source>echoCancellationLabel</source>
<translation>Enable echo cancellation</translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......
......@@ -695,6 +695,10 @@ Url du serveur non configurée.</translation>
<source>ringLabel</source>
<translation>Sonnerie</translation>
</message>
<message>
<source>echoCancellationLabel</source>
<translation>Activer annulation d&apos;écho</translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......
......@@ -137,6 +137,17 @@ void SettingsModel::setRingPath (const QString &path) {
emit ringPathChanged(cleaned_path);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getEchoCancellationEnabled () const {
return CoreManager::getInstance()->getCore()->echoCancellationEnabled();
}
void SettingsModel::setEchoCancellationEnabled (bool status) {
CoreManager::getInstance()->getCore()->enableEchoCancellation(status);
emit echoCancellationEnabledChanged(status);
}
// =============================================================================
// Chat & calls.
// =============================================================================
......
......@@ -47,6 +47,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(QString ringPath READ getRingPath WRITE setRingPath NOTIFY ringPathChanged);
Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY echoCancellationEnabledChanged);
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY(bool autoAnswerStatus READ getAutoAnswerStatus WRITE setAutoAnswerStatus NOTIFY autoAnswerStatusChanged);
......@@ -142,6 +144,9 @@ public:
QString getRingPath () const;
void setRingPath (const QString &path);
bool getEchoCancellationEnabled () const;
void setEchoCancellationEnabled (bool status);
// Chat & calls. -------------------------------------------------------------
bool getAutoAnswerStatus () const;
......@@ -242,6 +247,8 @@ signals:
void ringPathChanged (const QString &path);
void echoCancellationEnabledChanged (bool status);
// Chat & calls. -------------------------------------------------------------
void autoAnswerStatusChanged (bool status);
......
......@@ -70,5 +70,17 @@ TabContainer {
}
}
}
FormLine {
FormGroup {
label: qsTr('echoCancellationLabel')
Switch {
checked: SettingsModel.echoCancellationEnabled
onClicked: SettingsModel.echoCancellationEnabled = !checked
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment