Disable noise suppression by default.

This commit is contained in:
John Preston 2021-07-30 16:11:13 +03:00
parent bd78bac4bf
commit 4f89216db0
2 changed files with 14 additions and 8 deletions

View File

@ -112,8 +112,7 @@ QByteArray Settings::serialize() const {
+ sizeof(qint64)
+ sizeof(qint32) * 2
+ Serialize::bytearraySize(windowPosition)
+ sizeof(qint32)
+ Serialize::bytearraySize(_photoEditorBrush);
+ sizeof(qint32);
for (const auto &[id, rating] : recentEmojiPreloadData) {
size += Serialize::stringSize(id) + sizeof(quint16);
}
@ -123,7 +122,9 @@ QByteArray Settings::serialize() const {
}
size += sizeof(qint32) * 3
+ Serialize::bytearraySize(proxy)
+ sizeof(qint32) * 2;
+ sizeof(qint32) * 2
+ Serialize::bytearraySize(_photoEditorBrush)
+ sizeof(qint32);
auto result = QByteArray();
result.reserve(size);
@ -212,12 +213,13 @@ QByteArray Settings::serialize() const {
}
stream
<< qint32(0) // Old Disable OpenGL
<< qint32(_groupCallNoiseSuppression ? 1 : 0)
<< qint32(0) // Old Noise Suppression
<< qint32(_workMode.current())
<< proxy
<< qint32(_hiddenGroupCallTooltips.value())
<< qint32(_disableOpenGL ? 1 : 0)
<< _photoEditorBrush;
<< _photoEditorBrush
<< qint32(_groupCallNoiseSuppression ? 1 : 0);
}
return result;
}
@ -432,7 +434,8 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
stream >> disableOpenGLOld;
}
if (!stream.atEnd()) {
stream >> groupCallNoiseSuppression;
qint32 groupCallNoiseSuppressionOld;
stream >> groupCallNoiseSuppressionOld;
}
if (!stream.atEnd()) {
stream >> workMode;
@ -449,6 +452,9 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
if (!stream.atEnd()) {
stream >> photoEditorBrush;
}
if (!stream.atEnd()) {
stream >> groupCallNoiseSuppression;
}
if (stream.status() != QDataStream::Ok) {
LOG(("App Error: "
"Bad data for Core::Settings::constructFromSerialized()"));
@ -802,7 +808,7 @@ void Settings::resetOnLastLogout() {
_groupCallPushToTalkShortcut = QByteArray();
_groupCallPushToTalkDelay = 20;
_groupCallNoiseSuppression = true;
_groupCallNoiseSuppression = false;
//_themesAccentColors = Window::Theme::AccentColors();

View File

@ -653,7 +653,7 @@ private:
bool _callAudioDuckingEnabled = true;
bool _disableCalls = false;
bool _groupCallPushToTalk = false;
bool _groupCallNoiseSuppression = true;
bool _groupCallNoiseSuppression = false;
QByteArray _groupCallPushToTalkShortcut;
crl::time _groupCallPushToTalkDelay = 20;
Window::Theme::AccentColors _themesAccentColors;