mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-01 17:16:24 +00:00
feat(ui/views/App/Settings/SettingsAudio): supports echo cancellation
This commit is contained in:
parent
576a756422
commit
7ea31e5b53
5 changed files with 38 additions and 0 deletions
|
|
@ -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'é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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue