From 7409d615a3b6506e484cdad3ebe238bfa453f174 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 9 May 2020 02:37:43 +0400 Subject: [PATCH 01/21] Add a cheat code to enable freetype on Windows and macOS --- Telegram/SourceFiles/core/application.cpp | 15 +++++++ Telegram/SourceFiles/core/application.h | 1 + Telegram/SourceFiles/core/launcher.cpp | 42 ++++++++++++++++--- Telegram/SourceFiles/settings.cpp | 1 + Telegram/SourceFiles/settings.h | 1 + .../SourceFiles/settings/settings_codes.cpp | 15 +++++++ 6 files changed, 69 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index 584636fea..67d505718 100644 --- a/Telegram/SourceFiles/core/application.cpp +++ b/Telegram/SourceFiles/core/application.cpp @@ -518,6 +518,21 @@ void Application::switchTestMode() { App::restart(); } +void Application::switchFreeType() { + if (cUseFreeType()) { + QFile(cWorkingDir() + qsl("tdata/withfreetype")).remove(); + cSetUseFreeType(false); + } else { + QFile f(cWorkingDir() + qsl("tdata/withfreetype")); + if (f.open(QIODevice::WriteOnly)) { + f.write("1"); + f.close(); + } + cSetUseFreeType(true); + } + App::restart(); +} + void Application::writeInstallBetaVersionsSetting() { _launcher->writeInstallBetaVersionsSetting(); } diff --git a/Telegram/SourceFiles/core/application.h b/Telegram/SourceFiles/core/application.h index f2643fcbe..b4cf4c11d 100644 --- a/Telegram/SourceFiles/core/application.h +++ b/Telegram/SourceFiles/core/application.h @@ -215,6 +215,7 @@ public: void switchDebugMode(); void switchTestMode(); + void switchFreeType(); void writeInstallBetaVersionsSetting(); void call_handleUnreadCounterUpdate(); diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 19d9c3bbf..1d04386ee 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -34,26 +34,47 @@ private: static constexpr auto kForwardArgumentCount = 1; int _count = 0; - char *_arguments[kForwardArgumentCount + 1] = { nullptr }; + std::vector _owned; + std::vector _arguments; + + void pushArgument(const char *text); }; FilteredCommandLineArguments::FilteredCommandLineArguments( int argc, - char **argv) -: _count(std::clamp(argc, 0, kForwardArgumentCount)) { + char **argv) { // For now just pass only the first argument, the executable path. - for (auto i = 0; i != _count; ++i) { - _arguments[i] = argv[i]; + for (auto i = 0; i != kForwardArgumentCount; ++i) { + pushArgument(argv[i]); } + +#if defined Q_OS_WIN || defined Q_OS_MAC + if (cUseFreeType()) { + pushArgument("-platform"); +#ifdef Q_OS_WIN + pushArgument("windows:fontengine=freetype"); +#else // Q_OS_WIN + pushArgument("cocoa:fontengine=freetype"); +#endif // !Q_OS_WIN + } +#endif // Q_OS_WIN || Q_OS_MAC + + pushArgument(nullptr); } int &FilteredCommandLineArguments::count() { + _count = _arguments.size() - 1; return _count; } char **FilteredCommandLineArguments::values() { - return _arguments; + return _arguments.data(); +} + +void FilteredCommandLineArguments::pushArgument(const char *text) { + _owned.emplace_back(text); + _arguments.push_back(_owned.back().data()); } QString DebugModeSettingPath() { @@ -82,6 +103,12 @@ void ComputeTestMode() { } } +void ComputeFreeType() { + if (QFile(cWorkingDir() + qsl("tdata/withfreetype")).exists()) { + cSetUseFreeType(true); + } +} + QString InstallBetaVersionsSettingPath() { return cWorkingDir() + qsl("tdata/devversion"); } @@ -301,6 +328,7 @@ void Launcher::workingFolderReady() { ComputeTestMode(); ComputeDebugMode(); + ComputeFreeType(); ComputeInstallBetaVersions(); ComputeInstallationTag(); } @@ -382,6 +410,7 @@ void Launcher::processArguments() { auto parseMap = std::map { { "-testmode" , KeyFormat::NoValues }, { "-debug" , KeyFormat::NoValues }, + { "-freetype" , KeyFormat::NoValues }, { "-many" , KeyFormat::NoValues }, { "-key" , KeyFormat::OneValue }, { "-autostart" , KeyFormat::NoValues }, @@ -423,6 +452,7 @@ void Launcher::processArguments() { SetUpdaterDisabledAtStartup(); } gTestMode = parseResult.contains("-testmode"); + gUseFreeType = parseResult.contains("-freetype"); Logs::SetDebugEnabled(parseResult.contains("-debug")); gManyInstance = parseResult.contains("-many"); gKeyFile = parseResult.value("-key", {}).join(QString()).toLower(); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 1052fc7d1..3eddc2f80 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -39,6 +39,7 @@ bool gStartInTray = false; bool gAutoStart = false; bool gSendToMenu = false; bool gUseExternalVideoPlayer = false; +bool gUseFreeType = false; bool gAutoUpdate = true; TWindowPos gWindowPos; LaunchMode gLaunchMode = LaunchModeNormal; diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index b33e80119..940752d79 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -42,6 +42,7 @@ DeclareSetting(bool, StartMinimized); DeclareSetting(bool, StartInTray); DeclareSetting(bool, SendToMenu); DeclareSetting(bool, UseExternalVideoPlayer); +DeclareSetting(bool, UseFreeType); enum LaunchMode { LaunchModeNormal = 0, LaunchModeAutoStart, diff --git a/Telegram/SourceFiles/settings/settings_codes.cpp b/Telegram/SourceFiles/settings/settings_codes.cpp index bb965a89d..c4f20a7b1 100644 --- a/Telegram/SourceFiles/settings/settings_codes.cpp +++ b/Telegram/SourceFiles/settings/settings_codes.cpp @@ -126,6 +126,21 @@ auto GenerateCodes() { codes.emplace(qsl("export"), [](SessionController *window) { window->session().data().startExport(); }); +#if defined Q_OS_WIN || defined Q_OS_MAC + codes.emplace(qsl("freetype"), [](SessionController *window) { + auto text = cUseFreeType() +#ifdef Q_OS_WIN + ? qsl("Switch font engine to GDI?") +#else // Q_OS_WIN + ? qsl("Switch font engine to Cocoa?") +#endif // !Q_OS_WIN + : qsl("Switch font engine to FreeType?"); + + Ui::show(Box(text, [] { + Core::App().switchFreeType(); + })); + }); +#endif // Q_OS_WIN || Q_OS_MAC auto audioFilters = qsl("Audio files (*.wav *.mp3);;") + FileDialog::AllFilesFilter(); auto audioKeys = { From 9cbe899688e2152c52a9753e885a8518ffb67e9a Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 10 May 2020 21:01:01 +0400 Subject: [PATCH 02/21] Fix call window hiding when compositing is not supported --- Telegram/SourceFiles/calls/calls_panel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/calls/calls_panel.cpp b/Telegram/SourceFiles/calls/calls_panel.cpp index ae2ab2bf8..3156242a2 100644 --- a/Telegram/SourceFiles/calls/calls_panel.cpp +++ b/Telegram/SourceFiles/calls/calls_panel.cpp @@ -463,6 +463,8 @@ void Panel::toggleOpacityAnimation(bool visible) { _visible ? 1. : 0., st::callPanelDuration, _visible ? anim::easeOutCirc : anim::easeInCirc); + } else if (!isHidden() && !_visible) { + hide(); } if (isHidden() && _visible) { show(); From 701e1d7b4dcc7b5dff1dc913525618bb00f20dd2 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 8 May 2020 16:03:16 +0400 Subject: [PATCH 03/21] Add fcitx5 support --- .github/workflows/linux.yml | 4 ++-- .gitmodules | 3 +++ Telegram/CMakeLists.txt | 4 ++-- Telegram/ThirdParty/fcitx5-qt | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) create mode 160000 Telegram/ThirdParty/fcitx5-qt diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3403cdfb5..42dd12405 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -415,8 +415,8 @@ jobs: git clone -b v5.12.8 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT} cd qt_${QT} - perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg - git submodule update qtbase qtwayland qtimageformats qtsvg + perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qtx11extras + git submodule update qtbase qtwayland qtimageformats qtsvg qtx11extras cd qtbase git apply ../../patches/qtbase_${QT}.diff cd ../ diff --git a/.gitmodules b/.gitmodules index d6809ae1c..161f35581 100644 --- a/.gitmodules +++ b/.gitmodules @@ -91,3 +91,6 @@ [submodule "Telegram/ThirdParty/libqtxdg"] path = Telegram/ThirdParty/libqtxdg url = https://github.com/lxqt/libqtxdg.git +[submodule "Telegram/ThirdParty/fcitx5-qt"] + path = Telegram/ThirdParty/fcitx5-qt + url = https://github.com/fcitx/fcitx5-qt.git diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 0a766efee..35405679b 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -90,7 +90,7 @@ if (LINUX) PRIVATE desktop-app::external_statusnotifieritem desktop-app::external_dbusmenu_qt - desktop-app::external_fcitx_qt5 + desktop-app::external_fcitx5_qt5 desktop-app::external_hime_qt ) endif() @@ -138,7 +138,7 @@ endif() if (DESKTOP_APP_USE_PACKAGED) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads) + find_package(Threads REQUIRED) target_link_libraries(Telegram PRIVATE diff --git a/Telegram/ThirdParty/fcitx5-qt b/Telegram/ThirdParty/fcitx5-qt new file mode 160000 index 000000000..7561f994a --- /dev/null +++ b/Telegram/ThirdParty/fcitx5-qt @@ -0,0 +1 @@ +Subproject commit 7561f994a79320a4940a1f95c884004c4dd178f4 From 246ed4304660245a8202da72e08b3e20435cf4e4 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Oct 2019 09:41:49 +0200 Subject: [PATCH 04/21] Remove replyTo from switchInlineBotButton in same peer --- Telegram/SourceFiles/history/history_widget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index e54e7cd7e..c844479e6 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1433,8 +1433,7 @@ bool HistoryWidget::notify_switchInlineBotButtonReceived(const QString &query, U if (_history) { TextWithTags textWithTags = { '@' + samePeerBot->username + ' ' + query, TextWithTags::Tags() }; MessageCursor cursor = { textWithTags.text.size(), textWithTags.text.size(), QFIXED_MAX }; - auto replyTo = _history->peer->isUser() ? 0 : samePeerReplyTo; - _history->setLocalDraft(std::make_unique(textWithTags, replyTo, cursor, false)); + _history->setLocalDraft(std::make_unique(textWithTags, 0, cursor, false)); applyDraft(); return true; } From f5c0e5d31d52519fd8165ee44b8531db87f24c10 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 09:42:31 +0400 Subject: [PATCH 05/21] Remove unnecessary include. --- Telegram/SourceFiles/platform/win/main_window_win.cpp | 1 - Telegram/SourceFiles/platform/win/specific_win.cpp | 1 - Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp | 1 - 3 files changed, 3 deletions(-) diff --git a/Telegram/SourceFiles/platform/win/main_window_win.cpp b/Telegram/SourceFiles/platform/win/main_window_win.cpp index 4192df23f..9bc57ca93 100644 --- a/Telegram/SourceFiles/platform/win/main_window_win.cpp +++ b/Telegram/SourceFiles/platform/win/main_window_win.cpp @@ -35,7 +35,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include "platform/win/wrapper_wrl_implements_h.h" #include #include diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index e94d33764..2dd31eaf1 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -29,7 +29,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include "platform/win/wrapper_wrl_implements_h.h" #include #include diff --git a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp index a162dfce8..c05c259d8 100644 --- a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp +++ b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp @@ -13,7 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include "platform/win/wrapper_wrl_implements_h.h" #include using namespace Microsoft::WRL; From b5b78c0adefdd11f2971d839e52b677c1312b5d0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 09:44:24 +0400 Subject: [PATCH 06/21] Update submodules. --- Telegram/lib_ui | 2 +- cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/lib_ui b/Telegram/lib_ui index c9120970c..d05d9b214 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit c9120970c25a279c371250fac746521e7447a69b +Subproject commit d05d9b214da0e9708ff0c5f540c6fb09f6187e7d diff --git a/cmake b/cmake index 81a0fc797..a10bb86dc 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 81a0fc7970a62e8c1b194bd8eb85890528366ca7 +Subproject commit a10bb86dcdfc17a9b7f0c827534e46c8dc54bb8f From 295aa644bf12e3d2a99fd14120a65495d49b3f44 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 9 May 2020 17:15:31 +0300 Subject: [PATCH 07/21] Fixed master branch updater Github Action. --- .github/workflows/master_updater.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master_updater.yml b/.github/workflows/master_updater.yml index 1d8e50ae0..333eb43dd 100644 --- a/.github/workflows/master_updater.yml +++ b/.github/workflows/master_updater.yml @@ -12,9 +12,17 @@ jobs: to_branch: "master" steps: - uses: actions/checkout@v1 + if: env.SKIP == '0' - name: Push the code to the master branch. + if: env.SKIP == '0' run: | - url=https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + token=${{ secrets.TOKEN_FOR_MASTER_UPDATER }} + if [ -z "${token}" ]; then + echo "Token is unset. Nothing to do." + exit 0 + fi + + url=https://x-access-token:$token@github.com/$GITHUB_REPOSITORY latest_tag=$(git describe --tags --abbrev=0) echo "Latest tag: $latest_tag" From 07e3671ca8e61e2d9a972c19c520d16077b89aa0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 11:06:44 +0400 Subject: [PATCH 08/21] Allow monospace blocks to extend bubble width. This partially fixes #2060 instead of additional settings from #7822. --- Telegram/SourceFiles/boxes/create_poll_box.cpp | 2 +- .../SourceFiles/history/view/history_view_message.cpp | 11 +++++++++-- .../SourceFiles/history/view/history_view_message.h | 6 ++++-- .../media/streaming/media_streaming_video_track.cpp | 4 ++-- .../SourceFiles/window/themes/window_theme_editor.h | 2 +- Telegram/lib_ui | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/boxes/create_poll_box.cpp b/Telegram/SourceFiles/boxes/create_poll_box.cpp index 698ebc2d6..3ec7844b7 100644 --- a/Telegram/SourceFiles/boxes/create_poll_box.cpp +++ b/Telegram/SourceFiles/boxes/create_poll_box.cpp @@ -83,7 +83,7 @@ private: void show(anim::type animated); void destroy(FnMut done); - [[nodisacrd]] bool hasShadow() const; + [[nodiscard]] bool hasShadow() const; void createShadow(); void destroyShadow(); diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 9a09b5961..6f83064b1 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1464,6 +1464,12 @@ int Message::plainMaxWidth() const { + st::msgPadding.right(); } +int Message::monospaceMaxWidth() const { + return st::msgPadding.left() + + (hasVisibleText() ? message()->_text.countMaxMonospaceWidth() : 0) + + st::msgPadding.right(); +} + void Message::initLogEntryOriginal() { if (const auto log = message()->Get()) { AddComponents(LogEntryOriginal::Bit()); @@ -1787,7 +1793,7 @@ QRect Message::countGeometry() const { // contentLeft += st::msgPhotoSkip - (hmaxwidth - hwidth); } accumulate_min(contentWidth, maxWidth()); - accumulate_min(contentWidth, st::msgMaxWidth); + accumulate_min(contentWidth, _bubbleWidthLimit); if (mediaWidth < contentWidth) { const auto textualWidth = plainMaxWidth(); if (mediaWidth < textualWidth @@ -1829,7 +1835,8 @@ int Message::resizeContentGetHeight(int newWidth) { contentWidth -= st::msgPhotoSkip; } accumulate_min(contentWidth, maxWidth()); - accumulate_min(contentWidth, st::msgMaxWidth); + _bubbleWidthLimit = std::max(st::msgMaxWidth, monospaceMaxWidth()); + accumulate_min(contentWidth, _bubbleWidthLimit); if (mediaDisplayed) { media->resizeGetHeight(contentWidth); if (media->width() < contentWidth) { diff --git a/Telegram/SourceFiles/history/view/history_view_message.h b/Telegram/SourceFiles/history/view/history_view_message.h index d215e70a0..61effe84c 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.h +++ b/Telegram/SourceFiles/history/view/history_view_message.h @@ -157,8 +157,9 @@ private: const HistoryMessageEdited *displayedEditBadge() const; HistoryMessageEdited *displayedEditBadge(); void initTime(); - int timeLeft() const; - int plainMaxWidth() const; + [[nodiscard]] int timeLeft() const; + [[nodiscard]] int plainMaxWidth() const; + [[nodiscard]] int monospaceMaxWidth() const; WebPage *logEntryOriginal() const; @@ -167,6 +168,7 @@ private: mutable ClickHandlerPtr _rightActionLink; mutable ClickHandlerPtr _fastReplyLink; + int _bubbleWidthLimit = 0; }; diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp index 61e66870d..5c39f2f65 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp @@ -37,8 +37,8 @@ public: void process(std::vector &&packets); - [[nodisacrd]] rpl::producer<> checkNextFrame() const; - [[nodisacrd]] rpl::producer<> waitingForData() const; + [[nodiscard]] rpl::producer<> checkNextFrame() const; + [[nodiscard]] rpl::producer<> waitingForData() const; void pause(crl::time time); void resume(crl::time time); diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.h b/Telegram/SourceFiles/window/themes/window_theme_editor.h index 9a3c36352..b8e459888 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.h +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.h @@ -43,7 +43,7 @@ struct ParsedTheme { const QByteArray &value); [[nodiscard]] QByteArray WriteCloudToText(const Data::CloudTheme &cloud); [[nodiscard]] Data::CloudTheme ReadCloudFromText(const QByteArray &text); -[[nodisacrd]] QByteArray StripCloudTextFields(const QByteArray &text); +[[nodiscard]] QByteArray StripCloudTextFields(const QByteArray &text); class Editor : public TWidget { public: diff --git a/Telegram/lib_ui b/Telegram/lib_ui index d05d9b214..b1d00d0b2 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit d05d9b214da0e9708ff0c5f540c6fb09f6187e7d +Subproject commit b1d00d0b28cfce60d88b1a0a088539980adcfdb5 From cd75a4567347f108251d15877a8323d38977858e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 11:26:47 +0400 Subject: [PATCH 09/21] Disable create polls in support accounts. --- Telegram/SourceFiles/data/data_peer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index d087ab850..a29eaed90 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -770,7 +770,7 @@ int PeerData::slowmodeSecondsLeft() const { bool PeerData::canSendPolls() const { if (const auto user = asUser()) { - return user->isBot(); + return user->isBot() && !user->isSupport(); } else if (const auto chat = asChat()) { return chat->canSendPolls(); } else if (const auto channel = asChannel()) { From c7878f9d216fc663a85ed3c177171259326574f3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 12:18:31 +0400 Subject: [PATCH 10/21] Pause by-emoji stickers on sticker preview. --- .../chat_helpers/field_autocomplete.cpp | 19 ++++++++++----- .../chat_helpers/field_autocomplete.h | 24 +++++++++++-------- .../SourceFiles/history/history_widget.cpp | 2 +- Telegram/SourceFiles/history/history_widget.h | 4 +++- Telegram/ThirdParty/rlottie | 2 +- 5 files changed, 32 insertions(+), 19 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index b000c917a..a08ee6f9b 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -20,9 +20,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/widgets/scroll_area.h" #include "ui/image/image.h" #include "ui/ui_utility.h" -#include "main/main_session.h" #include "chat_helpers/stickers.h" #include "base/unixtime.h" +#include "window/window_session_controller.h" #include "facades.h" #include "app.h" #include "styles/style_history.h" @@ -33,14 +33,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL FieldAutocomplete::FieldAutocomplete( QWidget *parent, - not_null session) + not_null controller) : RpWidget(parent) -, _session(session) +, _controller(controller) , _scroll(this, st::mentionScroll) { _scroll->setGeometry(rect()); _inner = _scroll->setOwnedWidget( object_ptr( + _controller, this, &_mrows, &_hrows, @@ -169,7 +170,7 @@ inline int indexOfInFirstN(const T &v, const U &elem, int last) { internal::StickerRows FieldAutocomplete::getStickerSuggestions() { const auto list = Stickers::GetListByEmoji( - _session, + &_controller->session(), _emoji, _stickersSeed ); @@ -584,12 +585,14 @@ bool FieldAutocomplete::eventFilter(QObject *obj, QEvent *e) { namespace internal { FieldAutocompleteInner::FieldAutocompleteInner( + not_null controller, not_null parent, not_null mrows, not_null hrows, not_null brows, not_null srows) -: _parent(parent) +: _controller(controller) +, _parent(parent) , _mrows(mrows) , _hrows(hrows) , _brows(brows) @@ -665,7 +668,6 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) { } if (sticker.animated && sticker.animated->ready()) { const auto frame = sticker.animated->frame(); - sticker.animated->markFrameShown(); const auto size = frame.size() / cIntRetinaFactor(); const auto ppos = pos + QPoint( (st::stickerPanSize.width() - size.width()) / 2, @@ -673,6 +675,11 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) { p.drawImage( QRect(ppos, size), frame); + const auto paused = _controller->isGifPausedAtLeastFor( + Window::GifPauseReason::SavedGifs); + if (!paused) { + sticker.animated->markFrameShown(); + } } else if (const auto image = document->getStickerSmall()) { QPoint ppos = pos + QPoint((st::stickerPanSize.width() - w) / 2, (st::stickerPanSize.height() - h) / 2); p.drawPixmapLeft(ppos, width(), image->pix(document->stickerSetOrigin(), w, h)); diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h index 67b151c35..594293075 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h @@ -22,9 +22,9 @@ class SinglePlayer; class FrameRenderer; } // namespace Lottie; -namespace Main { -class Session; -} // namespace Main +namespace Window { +class SessionController; +} // namespace Window namespace internal { @@ -46,7 +46,9 @@ class FieldAutocomplete final : public Ui::RpWidget { Q_OBJECT public: - FieldAutocomplete(QWidget *parent, not_null session); + FieldAutocomplete( + QWidget *parent, + not_null controller); ~FieldAutocomplete(); bool clearFilteredBotCommands(); @@ -109,7 +111,7 @@ private: void recount(bool resetScroll = false); internal::StickerRows getStickerSuggestions(); - const not_null _session; + const not_null _controller; QPixmap _cache; internal::MentionRows _mrows; internal::HashtagRows _hrows; @@ -160,6 +162,7 @@ class FieldAutocompleteInner final public: FieldAutocompleteInner( + not_null controller, not_null parent, not_null mrows, not_null hrows, @@ -204,11 +207,12 @@ private: void repaintSticker(not_null document); std::shared_ptr getLottieRenderer(); - not_null _parent; - not_null _mrows; - not_null _hrows; - not_null _brows; - not_null _srows; + const not_null _controller; + const not_null _parent; + const not_null _mrows; + const not_null _hrows; + const not_null _brows; + const not_null _srows; rpl::lifetime _stickersLifetime; std::weak_ptr _lottieRenderer; int _stickersPerRow = 1; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index c844479e6..fb63f0672 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -263,7 +263,7 @@ HistoryWidget::HistoryWidget( , _scroll(this, st::historyScroll, false) , _historyDown(_scroll, st::historyToDown) , _unreadMentions(_scroll, st::historyUnreadMentions) -, _fieldAutocomplete(this, &session()) +, _fieldAutocomplete(this, controller) , _supportAutocomplete(session().supportMode() ? object_ptr(this, &session()) : nullptr) diff --git a/Telegram/SourceFiles/history/history_widget.h b/Telegram/SourceFiles/history/history_widget.h index 1a234059f..640e5fc7f 100644 --- a/Telegram/SourceFiles/history/history_widget.h +++ b/Telegram/SourceFiles/history/history_widget.h @@ -104,7 +104,9 @@ class HistoryWidget final public: using FieldHistoryAction = Ui::InputField::HistoryAction; - HistoryWidget(QWidget *parent, not_null controller); + HistoryWidget( + QWidget *parent, + not_null controller); void start(); diff --git a/Telegram/ThirdParty/rlottie b/Telegram/ThirdParty/rlottie index 3c280ce86..e0ea6af51 160000 --- a/Telegram/ThirdParty/rlottie +++ b/Telegram/ThirdParty/rlottie @@ -1 +1 @@ -Subproject commit 3c280ce86f649c1ea07c7ace5ed58162607c0edd +Subproject commit e0ea6af518345c4a46195c4951e023e621a9eb8f From f4f6550d66a75a6da0c0311e7fd94f20cfb2afd3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 12:18:52 +0400 Subject: [PATCH 11/21] Clear fake-unread status when switching folders. --- .../SourceFiles/window/window_session_controller.cpp | 12 ++++++++++++ .../SourceFiles/window/window_session_controller.h | 1 + 2 files changed, 13 insertions(+) diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index b0d81fa5e..2510431c2 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -242,6 +242,9 @@ bool SessionController::uniqueChatsInSearchResults() const { } void SessionController::openFolder(not_null folder) { + if (_openedFolder.current() != folder) { + resetFakeUnreadWhileOpened(); + } setActiveChatsFilter(0); _openedFolder = folder.get(); } @@ -269,6 +272,12 @@ void SessionController::setActiveChatEntry(Dialogs::RowDescriptor row) { } } +void SessionController::resetFakeUnreadWhileOpened() { + if (const auto history = _activeChatEntry.current().key.history()) { + history->setFakeUnreadWhileOpened(false); + } +} + bool SessionController::chatEntryHistoryMove(int steps) { if (_chatEntryHistory.empty()) { return false; @@ -781,6 +790,9 @@ FilterId SessionController::activeChatsFilterCurrent() const { } void SessionController::setActiveChatsFilter(FilterId id) { + if (activeChatsFilterCurrent() != id) { + resetFakeUnreadWhileOpened(); + } _activeChatsFilter.force_assign(id); if (id) { closeFolder(); diff --git a/Telegram/SourceFiles/window/window_session_controller.h b/Telegram/SourceFiles/window/window_session_controller.h index ef187d9cc..57aa189cb 100644 --- a/Telegram/SourceFiles/window/window_session_controller.h +++ b/Telegram/SourceFiles/window/window_session_controller.h @@ -328,6 +328,7 @@ private: void pushToChatEntryHistory(Dialogs::RowDescriptor row); bool chatEntryHistoryMove(int steps); + void resetFakeUnreadWhileOpened(); const not_null _window; From 6f760d513ea41b8017d4abd5f88e615fd5c0a10e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 14:04:53 +0400 Subject: [PATCH 12/21] Add a checkbox to disable taskbar flash. Also add ability to set urgent flag for the window on Linux. Fixes #223, fixes #897, fixes #906. --- Telegram/Resources/langs/lang.strings | 3 +++ Telegram/SourceFiles/facades.cpp | 4 +++ Telegram/SourceFiles/facades.h | 2 ++ Telegram/SourceFiles/intro/intro_step.cpp | 1 + Telegram/SourceFiles/mainwindow.cpp | 27 +++++++++++++++---- .../linux/notifications_manager_linux.cpp | 12 +++------ .../linux/notifications_manager_linux.h | 3 --- .../platform/mac/notifications_manager_mac.h | 3 --- .../platform/mac/notifications_manager_mac.mm | 8 +++--- .../platform/platform_notifications_manager.h | 11 ++++---- .../win/notifications_manager_win.cpp | 19 +++---------- .../settings/settings_notifications.cpp | 17 ++++++++++++ Telegram/SourceFiles/storage/localstorage.cpp | 12 ++++++--- .../window/notifications_manager.cpp | 11 +++++++- .../window/notifications_manager.h | 1 + 15 files changed, 86 insertions(+), 48 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 00a3d2bbb..4722c2f7d 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -300,6 +300,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_notifications_position" = "Location on the screen"; "lng_settings_notifications_count" = "Notifications count"; "lng_settings_sound_notify" = "Play sound"; +"lng_settings_alert_windows" = "Flash the taskbar icon"; +"lng_settings_alert_mac" = "Bounce the dock icon"; +"lng_settings_alert_linux" = "Draw attention to the window"; "lng_settings_badge_title" = "Badge counter"; "lng_settings_include_muted" = "Include muted chats in unread count"; "lng_settings_count_unread" = "Count unread messages"; diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 685766d11..ec52368c4 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -381,7 +381,9 @@ struct Data { bool VoiceMsgPlaybackDoubled = false; bool SoundNotify = true; bool DesktopNotify = true; + bool FlashBounceNotify = true; bool RestoreSoundNotifyFromTray = false; + bool RestoreFlashBounceNotifyFromTray = false; DBINotifyView NotifyView = dbinvShowPreview; bool NativeNotifications = false; int NotificationsCount = 3; @@ -508,7 +510,9 @@ DefineRefVar(Global, base::Observable, DownloadPathChanged); DefineVar(Global, bool, VoiceMsgPlaybackDoubled); DefineVar(Global, bool, SoundNotify); DefineVar(Global, bool, DesktopNotify); +DefineVar(Global, bool, FlashBounceNotify); DefineVar(Global, bool, RestoreSoundNotifyFromTray); +DefineVar(Global, bool, RestoreFlashBounceNotifyFromTray); DefineVar(Global, DBINotifyView, NotifyView); DefineVar(Global, bool, NativeNotifications); DefineVar(Global, int, NotificationsCount); diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index fd598df9f..2a18db821 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -210,7 +210,9 @@ DeclareRefVar(base::Observable, DownloadPathChanged); DeclareVar(bool, VoiceMsgPlaybackDoubled); DeclareVar(bool, SoundNotify); DeclareVar(bool, DesktopNotify); +DeclareVar(bool, FlashBounceNotify); DeclareVar(bool, RestoreSoundNotifyFromTray); +DeclareVar(bool, RestoreFlashBounceNotifyFromTray); DeclareVar(DBINotifyView, NotifyView); DeclareVar(bool, NativeNotifications); DeclareVar(int, NotificationsCount); diff --git a/Telegram/SourceFiles/intro/intro_step.cpp b/Telegram/SourceFiles/intro/intro_step.cpp index a749e6395..b47b1cfdb 100644 --- a/Telegram/SourceFiles/intro/intro_step.cpp +++ b/Telegram/SourceFiles/intro/intro_step.cpp @@ -40,6 +40,7 @@ void PrepareSupportMode() { Global::SetDesktopNotify(false); Global::SetSoundNotify(false); + Global::SetFlashBounceNotify(false); Auth().settings().autoDownload() = Full::FullDisabled(); Local::writeUserSettings(); } diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index f5192d683..5e6c68731 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -757,7 +757,8 @@ void MainWindow::toggleDisplayNotifyFromTray() { return; } - bool soundNotifyChanged = false; + auto soundNotifyChanged = false; + auto flashBounceNotifyChanged = false; Global::SetDesktopNotify(!Global::DesktopNotify()); if (Global::DesktopNotify()) { if (Global::RestoreSoundNotifyFromTray() && !Global::SoundNotify()) { @@ -765,6 +766,12 @@ void MainWindow::toggleDisplayNotifyFromTray() { Global::SetRestoreSoundNotifyFromTray(false); soundNotifyChanged = true; } + if (Global::RestoreFlashBounceNotifyFromTray() + && !Global::FlashBounceNotify()) { + Global::SetFlashBounceNotify(true); + Global::SetRestoreFlashBounceNotifyFromTray(false); + flashBounceNotifyChanged = true; + } } else { if (Global::SoundNotify()) { Global::SetSoundNotify(false); @@ -773,13 +780,23 @@ void MainWindow::toggleDisplayNotifyFromTray() { } else { Global::SetRestoreSoundNotifyFromTray(false); } + if (Global::FlashBounceNotify()) { + Global::SetFlashBounceNotify(false); + Global::SetRestoreFlashBounceNotifyFromTray(true); + flashBounceNotifyChanged = true; + } else { + Global::SetRestoreFlashBounceNotifyFromTray(false); + } } Local::writeUserSettings(); - account().session().notifications().settingsChanged().notify( - Window::Notifications::ChangeType::DesktopEnabled); + using Change = Window::Notifications::ChangeType; + auto &changes = account().session().notifications().settingsChanged(); + changes.notify(Change::DesktopEnabled); if (soundNotifyChanged) { - account().session().notifications().settingsChanged().notify( - Window::Notifications::ChangeType::SoundEnabled); + changes.notify(Change::SoundEnabled); + } + if (flashBounceNotifyChanged) { + changes.notify(Change::FlashBounceEnabled); } } diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 52635d210..6db3a13c9 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -457,15 +457,11 @@ bool SkipAudio() { } bool SkipToast() { -#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION - if (Supported() - && GetCapabilities().contains(qsl("inhibitions")) - && !InhibitedNotSupported) { - return Inhibited(); - } -#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION + return SkipAudio(); +} - return false; +bool SkipFlashBounce() { + return SkipAudio(); } bool Supported() { diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h index ba6bcc88f..1005c0403 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h @@ -19,9 +19,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Platform { namespace Notifications { -inline void FlashBounce() { -} - #ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION class NotificationData : public QObject { Q_OBJECT diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.h b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.h index 19a279102..59a741d0c 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.h +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.h @@ -13,9 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Platform { namespace Notifications { -bool SkipAudio(); -bool SkipToast(); - class Manager : public Window::Notifications::NativeManager, public base::has_weak_ptr { public: Manager(Window::Notifications::System *system); diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm index 3459086fe..6f327d121 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm @@ -143,6 +143,10 @@ bool SkipToast() { return DoNotDisturbEnabled; } +bool SkipFlashBounce() { + return SkipAudio(); +} + bool Supported() { return Platform::IsMac10_8OrGreater(); } @@ -154,10 +158,6 @@ std::unique_ptr Create(Window::Notifications::Sy return nullptr; } -void FlashBounce() { - [NSApp requestUserAttention:NSInformationalRequest]; -} - class Manager::Private : public QObject, private base::Subscriber { public: Private(Manager *manager); diff --git a/Telegram/SourceFiles/platform/platform_notifications_manager.h b/Telegram/SourceFiles/platform/platform_notifications_manager.h index 692f4b4e1..f0cdb152e 100644 --- a/Telegram/SourceFiles/platform/platform_notifications_manager.h +++ b/Telegram/SourceFiles/platform/platform_notifications_manager.h @@ -12,12 +12,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Platform { namespace Notifications { -bool SkipAudio(); -bool SkipToast(); +[[nodiscard]] bool SkipAudio(); +[[nodiscard]] bool SkipToast(); +[[nodiscard]] bool SkipFlashBounce(); -bool Supported(); -std::unique_ptr Create(Window::Notifications::System *system); -void FlashBounce(); +[[nodiscard]] bool Supported(); +[[nodiscard]] std::unique_ptr Create( + Window::Notifications::System *system); } // namespace Notifications } // namespace Platform diff --git a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp index 1d0e01d61..506f4b6fc 100644 --- a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp +++ b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp @@ -321,21 +321,6 @@ std::unique_ptr Create(Window::Notifications::Sy return nullptr; } -void FlashBounce() { - auto window = App::wnd(); - if (!window || GetForegroundWindow() == window->psHwnd()) { - return; - } - - FLASHWINFO info; - info.cbSize = sizeof(info); - info.hwnd = window->psHwnd(); - info.dwFlags = FLASHW_ALL; - info.dwTimeout = 0; - info.uCount = 1; - FlashWindowEx(&info); -} - class Manager::Private { public: using Type = Window::Notifications::CachedUserpics::Type; @@ -723,5 +708,9 @@ bool SkipToast() { return false; } +bool SkipFlashBounce() { + return SkipToast(); +} + } // namespace Notifications } // namespace Platform diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp index 9ec30eb9c..e4e456e27 100644 --- a/Telegram/SourceFiles/settings/settings_notifications.cpp +++ b/Telegram/SourceFiles/settings/settings_notifications.cpp @@ -568,6 +568,13 @@ void SetupNotificationsContent( const auto sound = addCheckbox( tr::lng_settings_sound_notify(tr::now), Global::SoundNotify()); + const auto flashbounce = addCheckbox( + (Platform::IsWindows() + ? tr::lng_settings_alert_windows + : Platform::IsMac() + ? tr::lng_settings_alert_mac + : tr::lng_settings_alert_linux)(tr::now), + Global::FlashBounceNotify()); AddSkip(container, st::settingsCheckboxesSkip); AddDivider(container); @@ -714,6 +721,14 @@ void SetupNotificationsContent( changed(Change::SoundEnabled); }, sound->lifetime()); + flashbounce->checkedChanges( + ) | rpl::filter([](bool checked) { + return (checked != Global::FlashBounceNotify()); + }) | rpl::start_with_next([=](bool checked) { + Global::SetFlashBounceNotify(checked); + changed(Change::FlashBounceEnabled); + }, flashbounce->lifetime()); + muted->checkedChanges( ) | rpl::filter([=](bool checked) { return (checked != session->settings().includeMutedCounter()); @@ -743,6 +758,8 @@ void SetupNotificationsContent( preview->toggle(name->entity()->checked(), anim::type::normal); } else if (change == Change::SoundEnabled) { sound->setChecked(Global::SoundNotify()); + } else if (change == Change::FlashBounceEnabled) { + flashbounce->setChecked(Global::FlashBounceNotify()); } }, desktop->lifetime()); diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index 7a9163ab8..ddc1e1a58 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -649,7 +649,7 @@ enum { dbiSendKeyOld = 0x05, dbiAutoStart = 0x06, dbiStartMinimized = 0x07, - dbiSoundNotify = 0x08, + dbiSoundFlashBounceNotify = 0x08, dbiWorkMode = 0x09, dbiSeenTrayTooltip = 0x0a, dbiDesktopNotify = 0x0b, @@ -1189,12 +1189,13 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting anim::SetDisabled(disabled == 1); } break; - case dbiSoundNotify: { + case dbiSoundFlashBounceNotify: { qint32 v; stream >> v; if (!_checkStreamStatus(stream)) return false; - Global::SetSoundNotify(v == 1); + Global::SetSoundNotify((v & 0x01) == 0x01); + Global::SetFlashBounceNotify((v & 0x02) == 0x00); } break; case dbiAutoDownloadOld: { @@ -2202,6 +2203,9 @@ void _writeUserSettings() { } size += sizeof(quint32) + Serialize::bytearraySize(callSettings); + const auto soundFlashBounce = (Global::SoundNotify() ? 0x01 : 0x00) + | (Global::FlashBounceNotify() ? 0x00 : 0x02); + EncryptedDescriptor data(size); data.stream << quint32(dbiTileBackground) @@ -2209,7 +2213,7 @@ void _writeUserSettings() { << qint32(Window::Theme::Background()->tileNight() ? 1 : 0); data.stream << quint32(dbiAdaptiveForWide) << qint32(Global::AdaptiveForWide() ? 1 : 0); data.stream << quint32(dbiAutoLock) << qint32(Global::AutoLock()); - data.stream << quint32(dbiSoundNotify) << qint32(Global::SoundNotify()); + data.stream << quint32(dbiSoundFlashBounceNotify) << qint32(soundFlashBounce); data.stream << quint32(dbiDesktopNotify) << qint32(Global::DesktopNotify()); data.stream << quint32(dbiNotifyView) << qint32(Global::NotifyView()); data.stream << quint32(dbiNativeNotifications) << qint32(Global::NativeNotifications()); diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index c3131598d..2d297637b 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -27,6 +27,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "facades.h" #include "app.h" +#include + namespace Window { namespace Notifications { namespace { @@ -290,7 +292,14 @@ void System::showNext() { } } if (alert) { - Platform::Notifications::FlashBounce(); + if (Global::FlashBounceNotify() && !Platform::Notifications::SkipFlashBounce()) { + if (const auto widget = App::wnd()) { + if (const auto window = widget->windowHandle()) { + window->alert(0); + // (window, SLOT(_q_clearAlert())); in the future. + } + } + } if (Global::SoundNotify() && !Platform::Notifications::SkipAudio()) { ensureSoundCreated(); _soundTrack->playOnce(); diff --git a/Telegram/SourceFiles/window/notifications_manager.h b/Telegram/SourceFiles/window/notifications_manager.h index 2b634d12f..b9c6ecceb 100644 --- a/Telegram/SourceFiles/window/notifications_manager.h +++ b/Telegram/SourceFiles/window/notifications_manager.h @@ -32,6 +32,7 @@ namespace Notifications { enum class ChangeType { SoundEnabled, + FlashBounceEnabled, IncludeMuted, CountMessages, DesktopEnabled, From 2ede53e0ee623cffd7b64664cb26056c50637eda Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 16:15:22 +0400 Subject: [PATCH 13/21] Always try to open new provided URL. Fixes #6941. --- Telegram/SourceFiles/core/sandbox.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 46c967b4f..da33fa951 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -373,11 +373,8 @@ void Sandbox::readClients() { toSend.append(_escapeFrom7bit(cmds.mid(from + 5, to - from - 5))); } } else if (cmd.startsWith(qsl("OPEN:"))) { - auto activateRequired = true; - if (cStartUrl().isEmpty()) { - startUrl = _escapeFrom7bit(cmds.mid(from + 5, to - from - 5)).mid(0, 8192); - activateRequired = StartUrlRequiresActivate(startUrl); - } + startUrl = _escapeFrom7bit(cmds.mid(from + 5, to - from - 5)).mid(0, 8192); + auto activateRequired = StartUrlRequiresActivate(startUrl); if (activateRequired) { execExternal("show"); } From c478d963854a703b2466b76dd7af0e05706ef455 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 16:18:19 +0400 Subject: [PATCH 14/21] Add debug logs for chats reading requests. --- Telegram/SourceFiles/data/data_histories.cpp | 50 ++++++++++++++++++++ Telegram/SourceFiles/history/history.cpp | 18 +++++++ 2 files changed, 68 insertions(+) diff --git a/Telegram/SourceFiles/data/data_histories.cpp b/Telegram/SourceFiles/data/data_histories.cpp index ee3da9421..a472fcb37 100644 --- a/Telegram/SourceFiles/data/data_histories.cpp +++ b/Telegram/SourceFiles/data/data_histories.cpp @@ -66,23 +66,32 @@ void Histories::clearAll() { } void Histories::readInbox(not_null history) { + DEBUG_LOG(("Reading: readInbox called.")); if (history->lastServerMessageKnown()) { const auto last = history->lastServerMessage(); + DEBUG_LOG(("Reading: last known, reading till %1." + ).arg(last ? last->id : 0)); readInboxTill(history, last ? last->id : 0); return; } else if (history->loadedAtBottom()) { if (const auto lastId = history->maxMsgId()) { + DEBUG_LOG(("Reading: loaded at bottom, maxMsgId %1." + ).arg(lastId)); readInboxTill(history, lastId); return; } else if (history->loadedAtTop()) { + DEBUG_LOG(("Reading: loaded at bottom, loaded at top.")); readInboxTill(history, 0); return; } + DEBUG_LOG(("Reading: loaded at bottom, but requesting entry.")); } requestDialogEntry(history, [=] { Expects(history->lastServerMessageKnown()); const auto last = history->lastServerMessage(); + DEBUG_LOG(("Reading: got entry, reading till %1." + ).arg(last ? last->id : 0)); readInboxTill(history, last ? last->id : 0); }); } @@ -135,10 +144,20 @@ void Histories::readInboxTill( bool force) { Expects(IsServerMsgId(tillId) || (!tillId && !force)); + DEBUG_LOG(("Reading: readInboxTill %1, force %2." + ).arg(tillId + ).arg(Logs::b(force))); + const auto syncGuard = gsl::finally([&] { + DEBUG_LOG(("Reading: in guard, unread %1." + ).arg(history->unreadCount())); if (history->unreadCount() > 0) { if (const auto last = history->lastServerMessage()) { + DEBUG_LOG(("Reading: checking last %1 and %2." + ).arg(last->id + ).arg(tillId)); if (last->id == tillId) { + DEBUG_LOG(("Reading: locally marked as read.")); history->setUnreadCount(0); history->updateChatListEntry(); } @@ -150,14 +169,21 @@ void Histories::readInboxTill( const auto needsRequest = history->readInboxTillNeedsRequest(tillId); if (!needsRequest && !force) { + DEBUG_LOG(("Reading: readInboxTill finish 1.")); return; } else if (!history->trackUnreadMessages()) { + DEBUG_LOG(("Reading: readInboxTill finish 2.")); return; } const auto maybeState = lookup(history); if (maybeState && maybeState->sentReadTill >= tillId) { + DEBUG_LOG(("Reading: readInboxTill finish 3 with %1." + ).arg(maybeState->sentReadTill)); return; } else if (maybeState && maybeState->willReadTill >= tillId) { + DEBUG_LOG(("Reading: readInboxTill finish 4 with %1 and force %2." + ).arg(maybeState->sentReadTill + ).arg(Logs::b(force))); if (force) { sendPendingReadInbox(history); } @@ -171,23 +197,35 @@ void Histories::readInboxTill( && stillUnread && history->unreadCountKnown() && *stillUnread == history->unreadCount()) { + DEBUG_LOG(("Reading: count didn't change so just update till %1" + ).arg(tillId)); history->setInboxReadTill(tillId); return; } auto &state = maybeState ? *maybeState : _states[history]; state.willReadTill = tillId; if (force || !stillUnread || !*stillUnread) { + DEBUG_LOG(("Reading: will read till %1 with still unread %2" + ).arg(tillId + ).arg(stillUnread.value_or(-666))); state.willReadWhen = 0; sendReadRequests(); if (!stillUnread) { return; } } else if (!state.willReadWhen) { + DEBUG_LOG(("Reading: will read till %1 with postponed").arg(tillId)); state.willReadWhen = crl::now() + kReadRequestTimeout; if (!_readRequestsTimer.isActive()) { _readRequestsTimer.callOnce(kReadRequestTimeout); } + } else { + DEBUG_LOG(("Reading: will read till %1 postponed already" + ).arg(tillId)); } + DEBUG_LOG(("Reading: marking now with till %1 and still %2" + ).arg(tillId + ).arg(*stillUnread)); history->setInboxReadTill(tillId); history->setUnreadCount(*stillUnread); history->updateChatListEntry(); @@ -399,6 +437,9 @@ void Histories::requestFakeChatListMessage( void Histories::sendPendingReadInbox(not_null history) { if (const auto state = lookup(history)) { + DEBUG_LOG(("Reading: send pending now with till %1 and when %2" + ).arg(state->willReadTill + ).arg(state->willReadWhen)); if (state->willReadTill && state->willReadWhen) { state->willReadWhen = 0; sendReadRequests(); @@ -407,6 +448,7 @@ void Histories::sendPendingReadInbox(not_null history) { } void Histories::sendReadRequests() { + DEBUG_LOG(("Reading: send requests with count %1.").arg(_states.size())); if (_states.empty()) { return; } @@ -414,10 +456,14 @@ void Histories::sendReadRequests() { auto next = std::optional(); for (auto &[history, state] : _states) { if (!state.willReadTill) { + DEBUG_LOG(("Reading: skipping zero till.")); continue; } else if (state.willReadWhen <= now) { + DEBUG_LOG(("Reading: sending with till %1." + ).arg(state.willReadTill)); sendReadRequest(history, state); } else if (!next || *next > state.willReadWhen) { + DEBUG_LOG(("Reading: scheduling for later send.")); next = state.willReadWhen; } } @@ -434,7 +480,11 @@ void Histories::sendReadRequest(not_null history, State &state) { const auto tillId = state.sentReadTill = base::take(state.willReadTill); state.willReadWhen = 0; state.sentReadDone = false; + DEBUG_LOG(("Reading: sending request now with till %1." + ).arg(tillId)); sendRequest(history, RequestType::ReadInbox, [=](Fn finish) { + DEBUG_LOG(("Reading: sending request invoked with till %1." + ).arg(tillId)); const auto finished = [=] { const auto state = lookup(history); Assert(state != nullptr); diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index ce51ea06a..9dc9d4056 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -1622,6 +1622,9 @@ bool History::readInboxTillNeedsRequest(MsgId tillId) { if (unreadMark()) { owner().histories().changeDialogUnreadMark(this, false); } + DEBUG_LOG(("Reading: readInboxTillNeedsRequest is_server %1, before %2." + ).arg(Logs::b(IsServerMsgId(tillId)) + ).arg(_inboxReadBefore.value_or(-666))); return IsServerMsgId(tillId) && (_inboxReadBefore.value_or(1) <= tillId); } @@ -1639,10 +1642,17 @@ bool History::unreadCountRefreshNeeded(MsgId readTillId) const { std::optional History::countStillUnreadLocal(MsgId readTillId) const { if (isEmpty() || !folderKnown()) { + DEBUG_LOG(("Reading: countStillUnreadLocal unknown %1 and %2." + ).arg(Logs::b(isEmpty()) + ).arg(Logs::b(folderKnown()))); return std::nullopt; } if (_inboxReadBefore) { const auto before = *_inboxReadBefore; + DEBUG_LOG(("Reading: check before %1 with min %2 and max %3." + ).arg(before + ).arg(minMsgId() + ).arg(maxMsgId())); if (minMsgId() <= before && maxMsgId() >= readTillId) { auto result = 0; for (const auto &block : blocks) { @@ -1658,12 +1668,19 @@ std::optional History::countStillUnreadLocal(MsgId readTillId) const { } } } + DEBUG_LOG(("Reading: check before result %1 with existing %2" + ).arg(result + ).arg(_unreadCount.value_or(-666))); if (_unreadCount) { return std::max(*_unreadCount - result, 0); } } } const auto minimalServerId = minMsgId(); + DEBUG_LOG(("Reading: check at end loaded from %1 loaded %2 - %3" + ).arg(minimalServerId + ).arg(Logs::b(loadedAtBottom()) + ).arg(Logs::b(loadedAtTop()))); if (!loadedAtBottom() || (!loadedAtTop() && !minimalServerId) || minimalServerId > readTillId) { @@ -1682,6 +1699,7 @@ std::optional History::countStillUnreadLocal(MsgId readTillId) const { } } } + DEBUG_LOG(("Reading: check at end counted %1").arg(result)); return result; } From 547c657b1a6f5f58d3775637d375292cd2007227 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 16:30:31 +0400 Subject: [PATCH 15/21] Don't reset search results on dialogs re-open. --- Telegram/SourceFiles/dialogs/dialogs_widget.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index f01a06957..c2610857b 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -674,7 +674,6 @@ void Widget::animationCallback() { updateControlsVisibility(true); - applyFilterUpdate(); if (!_filter->hasFocus()) { if (App::wnd()) App::wnd()->setInnerFocus(); } From 492dc2568c7150298789a1da3b58a33f2b14defa Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 9 May 2020 22:07:18 +0400 Subject: [PATCH 16/21] Add DESKTOP_APP_USE_PACKAGED support for Windows --- Telegram/CMakeLists.txt | 4 + Telegram/Resources/winrc/Telegram.rc | 13 +- Telegram/Resources/winrc/Updater.rc | 13 +- Telegram/SourceFiles/_other/packer.cpp | 2 +- Telegram/SourceFiles/_other/packer.h | 2 +- Telegram/SourceFiles/core/update_checker.cpp | 18 +- .../SourceFiles/platform/win/audio_win.cpp | 1 + .../platform/win/file_utilities_win.cpp | 8 +- .../platform/win/main_window_win.cpp | 36 +- .../win/notifications_manager_win.cpp | 14 + .../platform/win/notifications_manager_win.h | 2 + .../SourceFiles/platform/win/specific_win.cpp | 6 +- .../win/windows_app_user_model_id.cpp | 3 +- .../SourceFiles/platform/win/windows_dlls.h | 4 + .../platform/win/windows_event_filter.cpp | 2 +- Telegram/cmake/lib_tgvoip.cmake | 1245 +++++++++-------- 16 files changed, 727 insertions(+), 646 deletions(-) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 35405679b..bc4b446f9 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -1212,6 +1212,10 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR NOT LINUX) AND NOT build_macstore AND set_target_properties(Updater PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder}) + if (WIN32 AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_link_options(Updater PRIVATE -municode) + endif() + if (LINUX) target_link_options(Updater PRIVATE -static-libstdc++) endif() diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 519ded4b8..15fcb9845 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -6,7 +6,18 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "winres.h" +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 9e1f6fbd6..d9a674b2b 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -6,7 +6,18 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "winres.h" +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS diff --git a/Telegram/SourceFiles/_other/packer.cpp b/Telegram/SourceFiles/_other/packer.cpp index 4b00bab84..40e672f7c 100644 --- a/Telegram/SourceFiles/_other/packer.cpp +++ b/Telegram/SourceFiles/_other/packer.cpp @@ -268,7 +268,7 @@ int main(int argc, char *argv[]) cout << "Compression start, size: " << resultSize << "\n"; QByteArray compressed, resultCheck; -#ifdef Q_OS_WIN // use Lzma SDK for win +#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win const int32 hSigLen = 128, hShaLen = 20, hPropsLen = LZMA_PROPS_SIZE, hOriginalSizeLen = sizeof(int32), hSize = hSigLen + hShaLen + hPropsLen + hOriginalSizeLen; // header compressed.resize(hSize + resultSize + 1024 * 1024); // rsa signature + sha1 + lzma props + max compressed size diff --git a/Telegram/SourceFiles/_other/packer.h b/Telegram/SourceFiles/_other/packer.h index f74627f9e..d099ef0e3 100644 --- a/Telegram/SourceFiles/_other/packer.h +++ b/Telegram/SourceFiles/_other/packer.h @@ -27,7 +27,7 @@ extern "C" { #include } // extern "C" -#ifdef Q_OS_WIN // use Lzma SDK for win +#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win #include #else #include diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index 160571ea7..588bf0573 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -33,11 +33,11 @@ extern "C" { #include } // extern "C" -#ifdef Q_OS_WIN // use Lzma SDK for win +#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win #include -#else // Q_OS_WIN +#else // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED #include -#endif // else of Q_OS_WIN +#endif // else of Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED namespace Core { namespace { @@ -252,11 +252,11 @@ bool UnpackUpdate(const QString &filepath) { return false; } -#ifdef Q_OS_WIN // use Lzma SDK for win +#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win const int32 hSigLen = 128, hShaLen = 20, hPropsLen = LZMA_PROPS_SIZE, hOriginalSizeLen = sizeof(int32), hSize = hSigLen + hShaLen + hPropsLen + hOriginalSizeLen; // header -#else // Q_OS_WIN +#else // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED const int32 hSigLen = 128, hShaLen = 20, hPropsLen = 0, hOriginalSizeLen = sizeof(int32), hSize = hSigLen + hShaLen + hOriginalSizeLen; // header -#endif // Q_OS_WIN +#endif // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED QByteArray compressed = input.readAll(); int32 compressedLen = compressed.size() - hSize; @@ -311,14 +311,14 @@ bool UnpackUpdate(const QString &filepath) { uncompressed.resize(uncompressedLen); size_t resultLen = uncompressed.size(); -#ifdef Q_OS_WIN // use Lzma SDK for win +#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win SizeT srcLen = compressedLen; int uncompressRes = LzmaUncompress((uchar*)uncompressed.data(), &resultLen, (const uchar*)(compressed.constData() + hSize), &srcLen, (const uchar*)(compressed.constData() + hSigLen + hShaLen), LZMA_PROPS_SIZE); if (uncompressRes != SZ_OK) { LOG(("Update Error: could not uncompress lzma, code: %1").arg(uncompressRes)); return false; } -#else // Q_OS_WIN +#else // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED lzma_stream stream = LZMA_STREAM_INIT; lzma_ret ret = lzma_stream_decoder(&stream, UINT64_MAX, LZMA_CONCATENATED); @@ -361,7 +361,7 @@ bool UnpackUpdate(const QString &filepath) { LOG(("Error in decompression: %1 (error code %2)").arg(msg).arg(res)); return false; } -#endif // Q_OS_WIN +#endif // Q_OS_WIN && !DESKTOP_APP_USE_PACKAGED tempDir.mkdir(tempDir.absolutePath()); diff --git a/Telegram/SourceFiles/platform/win/audio_win.cpp b/Telegram/SourceFiles/platform/win/audio_win.cpp index db62394a3..152abb02e 100644 --- a/Telegram/SourceFiles/platform/win/audio_win.cpp +++ b/Telegram/SourceFiles/platform/win/audio_win.cpp @@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/win/windows_dlls.h" #include "media/audio/media_audio.h" +#include #include #include diff --git a/Telegram/SourceFiles/platform/win/file_utilities_win.cpp b/Telegram/SourceFiles/platform/win/file_utilities_win.cpp index d8ebc80ce..25113c27f 100644 --- a/Telegram/SourceFiles/platform/win/file_utilities_win.cpp +++ b/Telegram/SourceFiles/platform/win/file_utilities_win.cpp @@ -117,7 +117,13 @@ void UnsafeOpenEmailLink(const QString &email) { auto wstringUrl = url.toString(QUrl::FullyEncoded).toStdWString(); if (Dlls::SHOpenWithDialog) { OPENASINFO info; - info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC | OAIF_FILE_IS_URI | OAIF_URL_PROTOCOL; + info.oaifInFlags = OAIF_ALLOW_REGISTRATION + | OAIF_REGISTER_EXT + | OAIF_EXEC +#if WINVER >= 0x0602 + | OAIF_FILE_IS_URI +#endif // WINVER >= 0x602 + | OAIF_URL_PROTOCOL; info.pcszClass = NULL; info.pcszFile = wstringUrl.c_str(); Dlls::SHOpenWithDialog(0, &info); diff --git a/Telegram/SourceFiles/platform/win/main_window_win.cpp b/Telegram/SourceFiles/platform/win/main_window_win.cpp index 9bc57ca93..522a4ba92 100644 --- a/Telegram/SourceFiles/platform/win/main_window_win.cpp +++ b/Telegram/SourceFiles/platform/win/main_window_win.cpp @@ -35,7 +35,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include #include #include @@ -46,10 +45,28 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #undef min #undef max +// WM_POINTER support from Windows 8 onwards (WINVER >= 0x0602) +#ifndef WM_POINTERUPDATE +# define WM_NCPOINTERUPDATE 0x0241 +# define WM_NCPOINTERDOWN 0x0242 +# define WM_NCPOINTERUP 0x0243 +# define WM_POINTERUPDATE 0x0245 +# define WM_POINTERDOWN 0x0246 +# define WM_POINTERUP 0x0247 +# define WM_POINTERENTER 0x0249 +# define WM_POINTERLEAVE 0x024A +# define WM_POINTERACTIVATE 0x024B +# define WM_POINTERCAPTURECHANGED 0x024C +# define WM_POINTERWHEEL 0x024E +# define WM_POINTERHWHEEL 0x024F +#endif // WM_POINTERUPDATE + HICON qt_pixmapToWinHICON(const QPixmap &); using namespace Microsoft::WRL; +Q_DECLARE_METATYPE(QMargins); + namespace Platform { namespace { @@ -225,7 +242,7 @@ public: destroy(); return false; } - SetWindowLong(hwnds[i], GWL_HWNDPARENT, (LONG)hwnd); + SetWindowLongPtr(hwnds[i], GWLP_HWNDPARENT, (LONG)hwnd); dcs[i] = CreateCompatibleDC(screenDC); if (!dcs[i]) { @@ -711,18 +728,18 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { switch (mode) { case dbiwmWindowAndTray: { psSetupTrayIcon(); - HWND psOwner = (HWND)GetWindowLong(ps_hWnd, GWL_HWNDPARENT); + HWND psOwner = (HWND)GetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT); if (psOwner) { - SetWindowLong(ps_hWnd, GWL_HWNDPARENT, 0); + SetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT, 0); psRefreshTaskbarIcon(); } } break; case dbiwmTrayOnly: { psSetupTrayIcon(); - HWND psOwner = (HWND)GetWindowLong(ps_hWnd, GWL_HWNDPARENT); + HWND psOwner = (HWND)GetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT); if (!psOwner) { - SetWindowLong(ps_hWnd, GWL_HWNDPARENT, (LONG)ps_tbHider_hWnd); + SetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT, (LONG)ps_tbHider_hWnd); } } break; @@ -733,9 +750,9 @@ void MainWindow::workmodeUpdated(DBIWorkMode mode) { } trayIcon = 0; - HWND psOwner = (HWND)GetWindowLong(ps_hWnd, GWL_HWNDPARENT); + HWND psOwner = (HWND)GetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT); if (psOwner) { - SetWindowLong(ps_hWnd, GWL_HWNDPARENT, 0); + SetWindowLongPtr(ps_hWnd, GWLP_HWNDPARENT, 0); psRefreshTaskbarIcon(); } } break; @@ -873,7 +890,6 @@ void MainWindow::updateSystemMenu(Qt::WindowState state) { } } -Q_DECLARE_METATYPE(QMargins); void MainWindow::psUpdateMargins() { if (!ps_hWnd || _inUpdateMargins) return; @@ -884,7 +900,7 @@ void MainWindow::psUpdateMargins() { GetClientRect(ps_hWnd, &r); a = r; - LONG style = GetWindowLong(ps_hWnd, GWL_STYLE), styleEx = GetWindowLong(ps_hWnd, GWL_EXSTYLE); + LONG style = GetWindowLongPtr(ps_hWnd, GWL_STYLE), styleEx = GetWindowLongPtr(ps_hWnd, GWL_EXSTYLE); AdjustWindowRectEx(&a, style, false, styleEx); QMargins margins = QMargins(a.left - r.left, a.top - r.top, r.right - a.right, r.bottom - a.bottom); if (style & WS_MAXIMIZE) { diff --git a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp index 506f4b6fc..457f2e02c 100644 --- a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp +++ b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp @@ -20,6 +20,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include + +#ifndef __MINGW32__ #include "platform/win/wrapper_wrl_implements_h.h" #include @@ -32,9 +34,12 @@ using namespace Microsoft::WRL; using namespace ABI::Windows::UI::Notifications; using namespace ABI::Windows::Data::Xml::Dom; using namespace Windows::Foundation; +#endif // !__MINGW32__ namespace Platform { namespace Notifications { + +#ifndef __MINGW32__ namespace { class StringReferenceWrapper { @@ -302,25 +307,33 @@ void Check() { } } // namespace +#endif // !__MINGW32__ bool Supported() { +#ifndef __MINGW32__ if (!Checked) { Checked = true; Check(); } return InitSucceeded; +#endif // !__MINGW32__ + + return false; } std::unique_ptr Create(Window::Notifications::System *system) { +#ifndef __MINGW32__ if (Global::NativeNotifications() && Supported()) { auto result = std::make_unique(system); if (result->init()) { return std::move(result); } } +#endif // !__MINGW32__ return nullptr; } +#ifndef __MINGW32__ class Manager::Private { public: using Type = Window::Notifications::CachedUserpics::Type; @@ -597,6 +610,7 @@ void Manager::onBeforeNotificationActivated(PeerId peerId, MsgId msgId) { void Manager::onAfterNotificationActivated(PeerId peerId, MsgId msgId) { _private->afterNotificationActivated(peerId, msgId); } +#endif // !__MINGW32__ namespace { diff --git a/Telegram/SourceFiles/platform/win/notifications_manager_win.h b/Telegram/SourceFiles/platform/win/notifications_manager_win.h index 8ac5adb83..4a8a2c5f6 100644 --- a/Telegram/SourceFiles/platform/win/notifications_manager_win.h +++ b/Telegram/SourceFiles/platform/win/notifications_manager_win.h @@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Platform { namespace Notifications { +#ifndef __MINGW32__ class Manager : public Window::Notifications::NativeManager { public: Manager(Window::Notifications::System *system); @@ -41,6 +42,7 @@ private: const std::unique_ptr _private; }; +#endif // !__MINGW32__ } // namespace Notifications } // namespace Platform diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index 2dd31eaf1..8300625ae 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -29,7 +29,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include #include #include @@ -64,9 +63,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #endif using namespace Microsoft::WRL; -using namespace ABI::Windows::UI::Notifications; -using namespace ABI::Windows::Data::Xml::Dom; -using namespace Windows::Foundation; using namespace Platform; namespace { @@ -434,7 +430,7 @@ namespace { WCHAR defaultStr[bufSize] = { 0 }; if (RegQueryValueEx(rkey, value, 0, &defaultType, (BYTE*)defaultStr, &defaultSize) != ERROR_SUCCESS || defaultType != REG_SZ || defaultSize != (v.size() + 1) * 2 || QString::fromStdWString(defaultStr) != v) { WCHAR tmp[bufSize] = { 0 }; - if (!v.isEmpty()) wsprintf(tmp, v.replace(QChar('%'), qsl("%%")).toStdWString().c_str()); + if (!v.isEmpty()) StringCbPrintf(tmp, bufSize, v.replace(QChar('%'), qsl("%%")).toStdWString().c_str()); LSTATUS status = RegSetValueEx(rkey, value, 0, REG_SZ, (BYTE*)tmp, (wcslen(tmp) + 1) * sizeof(WCHAR)); if (status != ERROR_SUCCESS) { QString msg = qsl("App Error: could not set %1, error %2").arg(value ? ('\'' + QString::fromStdWString(value) + '\'') : qsl("(Default)")).arg("%1: %2"); diff --git a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp index c05c259d8..9e4c7f6cf 100644 --- a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp +++ b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp @@ -13,7 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#include using namespace Microsoft::WRL; @@ -287,6 +286,7 @@ bool validateShortcut() { PropVariantClear(&appIdPropVar); if (!SUCCEEDED(hr)) return false; +#if WINVER >= 0x602 PROPVARIANT startPinPropVar; hr = InitPropVariantFromUInt32(APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL, &startPinPropVar); if (!SUCCEEDED(hr)) return false; @@ -294,6 +294,7 @@ bool validateShortcut() { hr = propertyStore->SetValue(pkey_AppUserModel_StartPinOption, startPinPropVar); PropVariantClear(&startPinPropVar); if (!SUCCEEDED(hr)) return false; +#endif // WINVER >= 0x602 hr = propertyStore->Commit(); if (!SUCCEEDED(hr)) return false; diff --git a/Telegram/SourceFiles/platform/win/windows_dlls.h b/Telegram/SourceFiles/platform/win/windows_dlls.h index 341da5073..8844d87ef 100644 --- a/Telegram/SourceFiles/platform/win/windows_dlls.h +++ b/Telegram/SourceFiles/platform/win/windows_dlls.h @@ -15,6 +15,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#ifdef __MINGW32__ +#define __in +#endif + namespace Platform { namespace Dlls { diff --git a/Telegram/SourceFiles/platform/win/windows_event_filter.cpp b/Telegram/SourceFiles/platform/win/windows_event_filter.cpp index b7766049b..511a7e57a 100644 --- a/Telegram/SourceFiles/platform/win/windows_event_filter.cpp +++ b/Telegram/SourceFiles/platform/win/windows_event_filter.cpp @@ -191,7 +191,7 @@ bool EventFilter::mainWindowEvent( } return false; case WM_SHOWWINDOW: { - LONG style = GetWindowLong(hWnd, GWL_STYLE); + LONG style = GetWindowLongPtr(hWnd, GWL_STYLE); auto changes = ShadowsChange::Resized | ((wParam && !(style & (WS_MAXIMIZE | WS_MINIMIZE))) ? ShadowsChange::Shown : ShadowsChange::Hidden); _window->shadowsUpdate(changes); } return false; diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake index 3d13596fc..9ec1048cf 100644 --- a/Telegram/cmake/lib_tgvoip.cmake +++ b/Telegram/cmake/lib_tgvoip.cmake @@ -90,6 +90,7 @@ else() os/windows/AudioOutputWASAPI.h os/windows/AudioInputWASAPI.cpp os/windows/AudioInputWASAPI.h + os/windows/MinGWSupport.h os/windows/WindowsSpecific.cpp os/windows/WindowsSpecific.h @@ -122,613 +123,619 @@ else() # POSIX os/posix/NetworkSocketPosix.cpp os/posix/NetworkSocketPosix.h - - # WebRTC APM - webrtc_dsp/system_wrappers/include/field_trial.h - webrtc_dsp/system_wrappers/include/cpu_features_wrapper.h - webrtc_dsp/system_wrappers/include/asm_defines.h - webrtc_dsp/system_wrappers/include/metrics.h - webrtc_dsp/system_wrappers/include/compile_assert_c.h - webrtc_dsp/system_wrappers/source/field_trial.cc - webrtc_dsp/system_wrappers/source/metrics.cc - webrtc_dsp/system_wrappers/source/cpu_features.cc - webrtc_dsp/typedefs.h - webrtc_dsp/absl/strings/internal/memutil.h - webrtc_dsp/absl/strings/internal/memutil.cc - webrtc_dsp/absl/strings/string_view.cc - webrtc_dsp/absl/strings/ascii.h - webrtc_dsp/absl/strings/ascii.cc - webrtc_dsp/absl/strings/string_view.h - webrtc_dsp/absl/types/optional.h - webrtc_dsp/absl/types/bad_optional_access.h - webrtc_dsp/absl/types/bad_optional_access.cc - webrtc_dsp/absl/types/optional.cc - webrtc_dsp/absl/memory/memory.h - webrtc_dsp/absl/meta/type_traits.h - webrtc_dsp/absl/algorithm/algorithm.h - webrtc_dsp/absl/container/inlined_vector.h - webrtc_dsp/absl/base/policy_checks.h - webrtc_dsp/absl/base/port.h - webrtc_dsp/absl/base/config.h - webrtc_dsp/absl/base/internal/raw_logging.cc - webrtc_dsp/absl/base/internal/throw_delegate.cc - webrtc_dsp/absl/base/internal/invoke.h - webrtc_dsp/absl/base/internal/inline_variable.h - webrtc_dsp/absl/base/internal/atomic_hook.h - webrtc_dsp/absl/base/internal/identity.h - webrtc_dsp/absl/base/internal/raw_logging.h - webrtc_dsp/absl/base/internal/throw_delegate.h - webrtc_dsp/absl/base/attributes.h - webrtc_dsp/absl/base/macros.h - webrtc_dsp/absl/base/optimization.h - webrtc_dsp/absl/base/log_severity.h - webrtc_dsp/absl/utility/utility.h - webrtc_dsp/rtc_base/string_to_number.h - webrtc_dsp/rtc_base/constructormagic.h - webrtc_dsp/rtc_base/race_checker.cc - webrtc_dsp/rtc_base/strings/string_builder.h - webrtc_dsp/rtc_base/strings/string_builder.cc - webrtc_dsp/rtc_base/event_tracer.h - webrtc_dsp/rtc_base/stringencode.h - webrtc_dsp/rtc_base/memory/aligned_malloc.cc - webrtc_dsp/rtc_base/memory/aligned_malloc.h - webrtc_dsp/rtc_base/timeutils.cc - webrtc_dsp/rtc_base/event.h - webrtc_dsp/rtc_base/ignore_wundef.h - webrtc_dsp/rtc_base/stringutils.h - webrtc_dsp/rtc_base/arraysize.h - webrtc_dsp/rtc_base/platform_file.cc - webrtc_dsp/rtc_base/swap_queue.h - webrtc_dsp/rtc_base/string_to_number.cc - webrtc_dsp/rtc_base/trace_event.h - webrtc_dsp/rtc_base/checks.h - webrtc_dsp/rtc_base/deprecation.h - webrtc_dsp/rtc_base/thread_checker_impl.cc - webrtc_dsp/rtc_base/sanitizer.h - webrtc_dsp/rtc_base/scoped_ref_ptr.h - webrtc_dsp/rtc_base/logging.h - webrtc_dsp/rtc_base/logging_mac.h - webrtc_dsp/rtc_base/logging_mac.mm - webrtc_dsp/rtc_base/timeutils.h - webrtc_dsp/rtc_base/atomicops.h - webrtc_dsp/rtc_base/stringencode.cc - webrtc_dsp/rtc_base/stringutils.cc - webrtc_dsp/rtc_base/checks.cc - webrtc_dsp/rtc_base/numerics/safe_minmax.h - webrtc_dsp/rtc_base/numerics/safe_conversions.h - webrtc_dsp/rtc_base/numerics/safe_conversions_impl.h - webrtc_dsp/rtc_base/numerics/safe_compare.h - webrtc_dsp/rtc_base/system/unused.h - webrtc_dsp/rtc_base/system/inline.h - webrtc_dsp/rtc_base/system/ignore_warnings.h - webrtc_dsp/rtc_base/system/asm_defines.h - webrtc_dsp/rtc_base/system/rtc_export.h - webrtc_dsp/rtc_base/system/arch.h - webrtc_dsp/rtc_base/platform_thread.cc - webrtc_dsp/rtc_base/platform_thread.h - webrtc_dsp/rtc_base/platform_thread_types.h - webrtc_dsp/rtc_base/protobuf_utils.h - webrtc_dsp/rtc_base/thread_annotations.h - webrtc_dsp/rtc_base/gtest_prod_util.h - webrtc_dsp/rtc_base/function_view.h - webrtc_dsp/rtc_base/criticalsection.h - webrtc_dsp/rtc_base/criticalsection.cc - webrtc_dsp/rtc_base/platform_thread_types.cc - webrtc_dsp/rtc_base/refcount.h - webrtc_dsp/rtc_base/event.cc - webrtc_dsp/rtc_base/thread_checker_impl.h - webrtc_dsp/rtc_base/event_tracer.cc - webrtc_dsp/rtc_base/compile_assert_c.h - webrtc_dsp/rtc_base/logging_webrtc.cc - webrtc_dsp/rtc_base/type_traits.h - webrtc_dsp/rtc_base/platform_file.h - webrtc_dsp/rtc_base/refcounter.h - webrtc_dsp/rtc_base/logging_mac.h - webrtc_dsp/rtc_base/thread_checker.h - webrtc_dsp/rtc_base/race_checker.h - webrtc_dsp/rtc_base/refcountedobject.h - webrtc_dsp/third_party/rnnoise/src/rnn_vad_weights.cc - webrtc_dsp/third_party/rnnoise/src/rnn_activations.h - webrtc_dsp/third_party/rnnoise/src/kiss_fft.h - webrtc_dsp/third_party/rnnoise/src/kiss_fft.cc - webrtc_dsp/third_party/rnnoise/src/rnn_vad_weights.h - webrtc_dsp/api/audio/audio_frame.cc - webrtc_dsp/api/audio/echo_canceller3_config.h - webrtc_dsp/api/audio/echo_control.h - webrtc_dsp/api/audio/audio_frame.h - webrtc_dsp/api/audio/echo_canceller3_config.cc - webrtc_dsp/api/audio/echo_canceller3_factory.h - webrtc_dsp/api/audio/echo_canceller3_factory.cc - webrtc_dsp/api/array_view.h - webrtc_dsp/modules/third_party/fft/fft.h - webrtc_dsp/modules/third_party/fft/fft.c - webrtc_dsp/modules/audio_coding/codecs/isac/bandwidth_info.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/include/isac.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filterbanks.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/entropy_coding.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_vad.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/settings.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/transform.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/crc.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_filter.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filter_functions.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lattice.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/intialize.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_float_type.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/codec.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/entropy_coding.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_vad.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/structs.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filter_functions.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_filter.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/crc.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode_bwe.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac.c - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h - webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_tables.h - webrtc_dsp/modules/audio_processing/rms_level.cc - webrtc_dsp/modules/audio_processing/echo_detector/moving_max.h - webrtc_dsp/modules/audio_processing/echo_detector/circular_buffer.h - webrtc_dsp/modules/audio_processing/echo_detector/normalized_covariance_estimator.h - webrtc_dsp/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc - webrtc_dsp/modules/audio_processing/echo_detector/moving_max.cc - webrtc_dsp/modules/audio_processing/echo_detector/circular_buffer.cc - webrtc_dsp/modules/audio_processing/echo_detector/mean_variance_estimator.cc - webrtc_dsp/modules/audio_processing/echo_detector/mean_variance_estimator.h - webrtc_dsp/modules/audio_processing/gain_control_for_experimental_agc.h - webrtc_dsp/modules/audio_processing/splitting_filter.cc - webrtc_dsp/modules/audio_processing/gain_control_impl.cc - webrtc_dsp/modules/audio_processing/rms_level.h - webrtc_dsp/modules/audio_processing/ns/ns_core.h - webrtc_dsp/modules/audio_processing/ns/nsx_core.c - webrtc_dsp/modules/audio_processing/ns/noise_suppression_x.c - webrtc_dsp/modules/audio_processing/ns/nsx_core_c.c - webrtc_dsp/modules/audio_processing/ns/defines.h - webrtc_dsp/modules/audio_processing/ns/noise_suppression.h - webrtc_dsp/modules/audio_processing/ns/ns_core.c - webrtc_dsp/modules/audio_processing/ns/nsx_core.h - webrtc_dsp/modules/audio_processing/ns/windows_private.h - webrtc_dsp/modules/audio_processing/ns/noise_suppression_x.h - webrtc_dsp/modules/audio_processing/ns/noise_suppression.c - webrtc_dsp/modules/audio_processing/ns/nsx_defines.h - webrtc_dsp/modules/audio_processing/residual_echo_detector.h - webrtc_dsp/modules/audio_processing/audio_processing_impl.h - webrtc_dsp/modules/audio_processing/audio_buffer.cc - webrtc_dsp/modules/audio_processing/typing_detection.cc - webrtc_dsp/modules/audio_processing/render_queue_item_verifier.h - webrtc_dsp/modules/audio_processing/include/audio_generator.h - webrtc_dsp/modules/audio_processing/include/config.h - webrtc_dsp/modules/audio_processing/include/audio_frame_view.h - webrtc_dsp/modules/audio_processing/include/mock_audio_processing.h - webrtc_dsp/modules/audio_processing/include/gain_control.h - webrtc_dsp/modules/audio_processing/include/audio_generator_factory.h - webrtc_dsp/modules/audio_processing/include/audio_processing_statistics.cc - webrtc_dsp/modules/audio_processing/include/audio_generator_factory.cc - webrtc_dsp/modules/audio_processing/include/aec_dump.cc - webrtc_dsp/modules/audio_processing/include/aec_dump.h - webrtc_dsp/modules/audio_processing/include/audio_processing_statistics.h - webrtc_dsp/modules/audio_processing/include/audio_processing.h - webrtc_dsp/modules/audio_processing/include/audio_processing.cc - webrtc_dsp/modules/audio_processing/include/config.cc - webrtc_dsp/modules/audio_processing/agc2/interpolated_gain_curve.h - webrtc_dsp/modules/audio_processing/agc2/biquad_filter.h - webrtc_dsp/modules/audio_processing/agc2/interpolated_gain_curve.cc - webrtc_dsp/modules/audio_processing/agc2/agc2_common.cc - webrtc_dsp/modules/audio_processing/agc2/agc2_testing_common.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator.h - webrtc_dsp/modules/audio_processing/agc2/gain_applier.cc - webrtc_dsp/modules/audio_processing/agc2/signal_classifier.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_agc.cc - webrtc_dsp/modules/audio_processing/agc2/adaptive_digital_gain_applier.cc - webrtc_dsp/modules/audio_processing/agc2/limiter.cc - webrtc_dsp/modules/audio_processing/agc2/saturation_protector.cc - webrtc_dsp/modules/audio_processing/agc2/vector_float_frame.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/sequence_buffer.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/rnn.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/rnn.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/test_utils.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_info.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/lp_residual.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/ring_buffer.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/symmetric_matrix_buffer.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/features_extraction.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/common.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/fft_util.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search.h - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/features_extraction.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/fft_util.cc - webrtc_dsp/modules/audio_processing/agc2/rnn_vad/lp_residual.cc - webrtc_dsp/modules/audio_processing/agc2/fixed_gain_controller.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.cc - webrtc_dsp/modules/audio_processing/agc2/vector_float_frame.cc - webrtc_dsp/modules/audio_processing/agc2/down_sampler.h - webrtc_dsp/modules/audio_processing/agc2/noise_level_estimator.cc - webrtc_dsp/modules/audio_processing/agc2/agc2_testing_common.cc - webrtc_dsp/modules/audio_processing/agc2/fixed_digital_level_estimator.cc - webrtc_dsp/modules/audio_processing/agc2/fixed_gain_controller.cc - webrtc_dsp/modules/audio_processing/agc2/saturation_protector.h - webrtc_dsp/modules/audio_processing/agc2/vad_with_level.cc - webrtc_dsp/modules/audio_processing/agc2/limiter_db_gain_curve.cc - webrtc_dsp/modules/audio_processing/agc2/agc2_common.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_digital_gain_applier.h - webrtc_dsp/modules/audio_processing/agc2/vad_with_level.h - webrtc_dsp/modules/audio_processing/agc2/limiter_db_gain_curve.h - webrtc_dsp/modules/audio_processing/agc2/fixed_digital_level_estimator.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_agc.h - webrtc_dsp/modules/audio_processing/agc2/gain_applier.h - webrtc_dsp/modules/audio_processing/agc2/down_sampler.cc - webrtc_dsp/modules/audio_processing/agc2/noise_level_estimator.h - webrtc_dsp/modules/audio_processing/agc2/signal_classifier.cc - webrtc_dsp/modules/audio_processing/agc2/noise_spectrum_estimator.cc - webrtc_dsp/modules/audio_processing/agc2/compute_interpolated_gain_curve.cc - webrtc_dsp/modules/audio_processing/agc2/compute_interpolated_gain_curve.h - webrtc_dsp/modules/audio_processing/agc2/biquad_filter.cc - webrtc_dsp/modules/audio_processing/agc2/noise_spectrum_estimator.h - webrtc_dsp/modules/audio_processing/agc2/limiter.h - webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc - webrtc_dsp/modules/audio_processing/transient/moving_moments.cc - webrtc_dsp/modules/audio_processing/transient/transient_detector.h - webrtc_dsp/modules/audio_processing/transient/wpd_tree.cc - webrtc_dsp/modules/audio_processing/transient/transient_suppressor.h - webrtc_dsp/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h - webrtc_dsp/modules/audio_processing/transient/common.h - webrtc_dsp/modules/audio_processing/transient/wpd_node.h - webrtc_dsp/modules/audio_processing/transient/moving_moments.h - webrtc_dsp/modules/audio_processing/transient/wpd_tree.h - webrtc_dsp/modules/audio_processing/transient/wpd_node.cc - webrtc_dsp/modules/audio_processing/transient/transient_suppressor.cc - webrtc_dsp/modules/audio_processing/transient/transient_detector.cc - webrtc_dsp/modules/audio_processing/transient/dyadic_decimator.h - webrtc_dsp/modules/audio_processing/low_cut_filter.cc - webrtc_dsp/modules/audio_processing/noise_suppression_impl.h - webrtc_dsp/modules/audio_processing/level_estimator_impl.cc - webrtc_dsp/modules/audio_processing/three_band_filter_bank.cc - webrtc_dsp/modules/audio_processing/aec/echo_cancellation.cc - webrtc_dsp/modules/audio_processing/aec/aec_resampler.h - webrtc_dsp/modules/audio_processing/aec/aec_resampler.cc - webrtc_dsp/modules/audio_processing/aec/echo_cancellation.h - webrtc_dsp/modules/audio_processing/aec/aec_core.cc - webrtc_dsp/modules/audio_processing/aec/aec_core.h - webrtc_dsp/modules/audio_processing/aec/aec_core_optimized_methods.h - webrtc_dsp/modules/audio_processing/aec/aec_core_sse2.cc - webrtc_dsp/modules/audio_processing/aec/aec_common.h - webrtc_dsp/modules/audio_processing/voice_detection_impl.h - webrtc_dsp/modules/audio_processing/voice_detection_impl.cc - webrtc_dsp/modules/audio_processing/echo_cancellation_impl.cc - webrtc_dsp/modules/audio_processing/gain_control_for_experimental_agc.cc - webrtc_dsp/modules/audio_processing/agc/agc.cc - webrtc_dsp/modules/audio_processing/agc/loudness_histogram.cc - webrtc_dsp/modules/audio_processing/agc/agc_manager_direct.cc - webrtc_dsp/modules/audio_processing/agc/legacy/analog_agc.h - webrtc_dsp/modules/audio_processing/agc/legacy/gain_control.h - webrtc_dsp/modules/audio_processing/agc/legacy/digital_agc.h - webrtc_dsp/modules/audio_processing/agc/legacy/analog_agc.c - webrtc_dsp/modules/audio_processing/agc/legacy/digital_agc.c - webrtc_dsp/modules/audio_processing/agc/utility.cc - webrtc_dsp/modules/audio_processing/agc/mock_agc.h - webrtc_dsp/modules/audio_processing/agc/loudness_histogram.h - webrtc_dsp/modules/audio_processing/agc/gain_map_internal.h - webrtc_dsp/modules/audio_processing/agc/utility.h - webrtc_dsp/modules/audio_processing/agc/agc_manager_direct.h - webrtc_dsp/modules/audio_processing/agc/agc.h - webrtc_dsp/modules/audio_processing/common.h - webrtc_dsp/modules/audio_processing/audio_processing_impl.cc - webrtc_dsp/modules/audio_processing/audio_buffer.h - webrtc_dsp/modules/audio_processing/echo_control_mobile_impl.h - webrtc_dsp/modules/audio_processing/splitting_filter.h - webrtc_dsp/modules/audio_processing/low_cut_filter.h - webrtc_dsp/modules/audio_processing/audio_generator/file_audio_generator.h - webrtc_dsp/modules/audio_processing/audio_generator/file_audio_generator.cc - webrtc_dsp/modules/audio_processing/gain_controller2.cc - webrtc_dsp/modules/audio_processing/three_band_filter_bank.h - webrtc_dsp/modules/audio_processing/residual_echo_detector.cc - webrtc_dsp/modules/audio_processing/echo_cancellation_impl.h - webrtc_dsp/modules/audio_processing/noise_suppression_impl.cc - webrtc_dsp/modules/audio_processing/level_estimator_impl.h - webrtc_dsp/modules/audio_processing/gain_controller2.h - webrtc_dsp/modules/audio_processing/aecm/aecm_core.h - webrtc_dsp/modules/audio_processing/aecm/aecm_defines.h - webrtc_dsp/modules/audio_processing/aecm/aecm_core.cc - webrtc_dsp/modules/audio_processing/aecm/aecm_core_c.cc - webrtc_dsp/modules/audio_processing/aecm/echo_control_mobile.h - webrtc_dsp/modules/audio_processing/aecm/echo_control_mobile.cc - webrtc_dsp/modules/audio_processing/aec3/render_reverb_model.cc - webrtc_dsp/modules/audio_processing/aec3/downsampled_render_buffer.h - webrtc_dsp/modules/audio_processing/aec3/subtractor_output_analyzer.h - webrtc_dsp/modules/audio_processing/aec3/reverb_model_fallback.cc - webrtc_dsp/modules/audio_processing/aec3/residual_echo_estimator.h - webrtc_dsp/modules/audio_processing/aec3/shadow_filter_update_gain.h - webrtc_dsp/modules/audio_processing/aec3/echo_remover_metrics.cc - webrtc_dsp/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer2.cc - webrtc_dsp/modules/audio_processing/aec3/aec_state.h - webrtc_dsp/modules/audio_processing/aec3/suppression_filter.h - webrtc_dsp/modules/audio_processing/aec3/echo_path_variability.cc - webrtc_dsp/modules/audio_processing/aec3/frame_blocker.cc - webrtc_dsp/modules/audio_processing/aec3/subtractor.cc - webrtc_dsp/modules/audio_processing/aec3/block_delay_buffer.h - webrtc_dsp/modules/audio_processing/aec3/adaptive_fir_filter.h - webrtc_dsp/modules/audio_processing/aec3/cascaded_biquad_filter.h - webrtc_dsp/modules/audio_processing/aec3/matched_filter.h - webrtc_dsp/modules/audio_processing/aec3/subtractor_output.h - webrtc_dsp/modules/audio_processing/aec3/render_signal_analyzer.h - webrtc_dsp/modules/audio_processing/aec3/aec3_fft.cc - webrtc_dsp/modules/audio_processing/aec3/aec3_fft.h - webrtc_dsp/modules/audio_processing/aec3/echo_remover_metrics.h - webrtc_dsp/modules/audio_processing/aec3/fullband_erle_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/suppression_filter.cc - webrtc_dsp/modules/audio_processing/aec3/block_processor.cc - webrtc_dsp/modules/audio_processing/aec3/filter_analyzer.h - webrtc_dsp/modules/audio_processing/aec3/subtractor.h - webrtc_dsp/modules/audio_processing/aec3/echo_path_delay_estimator.h - webrtc_dsp/modules/audio_processing/aec3/subband_erle_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_controller_metrics.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/block_processor_metrics.h - webrtc_dsp/modules/audio_processing/aec3/vector_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/erl_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/aec_state.cc - webrtc_dsp/modules/audio_processing/aec3/adaptive_fir_filter.cc - webrtc_dsp/modules/audio_processing/aec3/fft_data.h - webrtc_dsp/modules/audio_processing/aec3/render_delay_controller.cc - webrtc_dsp/modules/audio_processing/aec3/skew_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_controller_metrics.h - webrtc_dsp/modules/audio_processing/aec3/comfort_noise_generator.h - webrtc_dsp/modules/audio_processing/aec3/echo_path_delay_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/erl_estimator.h - webrtc_dsp/modules/audio_processing/aec3/echo_remover.h - webrtc_dsp/modules/audio_processing/aec3/block_framer.cc - webrtc_dsp/modules/audio_processing/aec3/erle_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_model.cc - webrtc_dsp/modules/audio_processing/aec3/cascaded_biquad_filter.cc - webrtc_dsp/modules/audio_processing/aec3/matrix_buffer.h - webrtc_dsp/modules/audio_processing/aec3/render_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_model_estimator.h - webrtc_dsp/modules/audio_processing/aec3/subtractor_output.cc - webrtc_dsp/modules/audio_processing/aec3/stationarity_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/render_signal_analyzer.cc - webrtc_dsp/modules/audio_processing/aec3/echo_path_variability.h - webrtc_dsp/modules/audio_processing/aec3/moving_average.h - webrtc_dsp/modules/audio_processing/aec3/render_reverb_model.h - webrtc_dsp/modules/audio_processing/aec3/subtractor_output_analyzer.cc - webrtc_dsp/modules/audio_processing/aec3/suppression_gain.cc - webrtc_dsp/modules/audio_processing/aec3/echo_audibility.cc - webrtc_dsp/modules/audio_processing/aec3/block_processor_metrics.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_controller.h - webrtc_dsp/modules/audio_processing/aec3/suppression_gain.h - webrtc_dsp/modules/audio_processing/aec3/moving_average.cc - webrtc_dsp/modules/audio_processing/aec3/erle_estimator.h - webrtc_dsp/modules/audio_processing/aec3/subband_erle_estimator.h - webrtc_dsp/modules/audio_processing/aec3/reverb_model_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/aec3_common.cc - webrtc_dsp/modules/audio_processing/aec3/residual_echo_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/block_processor.h - webrtc_dsp/modules/audio_processing/aec3/fullband_erle_estimator.h - webrtc_dsp/modules/audio_processing/aec3/matched_filter.cc - webrtc_dsp/modules/audio_processing/aec3/stationarity_estimator.h - webrtc_dsp/modules/audio_processing/aec3/echo_canceller3.h - webrtc_dsp/modules/audio_processing/aec3/skew_estimator.h - webrtc_dsp/modules/audio_processing/aec3/reverb_decay_estimator.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_controller2.cc - webrtc_dsp/modules/audio_processing/aec3/render_buffer.h - webrtc_dsp/modules/audio_processing/aec3/suppression_gain_limiter.cc - webrtc_dsp/modules/audio_processing/aec3/main_filter_update_gain.cc - webrtc_dsp/modules/audio_processing/aec3/echo_remover.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_model_fallback.h - webrtc_dsp/modules/audio_processing/aec3/downsampled_render_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/vector_buffer.h - webrtc_dsp/modules/audio_processing/aec3/matrix_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_frequency_response.h - webrtc_dsp/modules/audio_processing/aec3/echo_audibility.h - webrtc_dsp/modules/audio_processing/aec3/fft_buffer.h - webrtc_dsp/modules/audio_processing/aec3/block_processor2.cc - webrtc_dsp/modules/audio_processing/aec3/echo_canceller3.cc - webrtc_dsp/modules/audio_processing/aec3/block_delay_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/aec3_common.h - webrtc_dsp/modules/audio_processing/aec3/fft_buffer.cc - webrtc_dsp/modules/audio_processing/aec3/vector_math.h - webrtc_dsp/modules/audio_processing/aec3/decimator.h - webrtc_dsp/modules/audio_processing/aec3/frame_blocker.h - webrtc_dsp/modules/audio_processing/aec3/block_framer.h - webrtc_dsp/modules/audio_processing/aec3/suppression_gain_limiter.h - webrtc_dsp/modules/audio_processing/aec3/delay_estimate.h - webrtc_dsp/modules/audio_processing/aec3/comfort_noise_generator.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_model.h - webrtc_dsp/modules/audio_processing/aec3/main_filter_update_gain.h - webrtc_dsp/modules/audio_processing/aec3/matched_filter_lag_aggregator.h - webrtc_dsp/modules/audio_processing/aec3/shadow_filter_update_gain.cc - webrtc_dsp/modules/audio_processing/aec3/filter_analyzer.cc - webrtc_dsp/modules/audio_processing/aec3/reverb_decay_estimator.h - webrtc_dsp/modules/audio_processing/aec3/reverb_frequency_response.cc - webrtc_dsp/modules/audio_processing/aec3/decimator.cc - webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer.h - webrtc_dsp/modules/audio_processing/echo_control_mobile_impl.cc - webrtc_dsp/modules/audio_processing/gain_control_impl.h - webrtc_dsp/modules/audio_processing/typing_detection.h - webrtc_dsp/modules/audio_processing/logging/apm_data_dumper.cc - webrtc_dsp/modules/audio_processing/logging/apm_data_dumper.h - webrtc_dsp/modules/audio_processing/vad/voice_activity_detector.cc - webrtc_dsp/modules/audio_processing/vad/standalone_vad.cc - webrtc_dsp/modules/audio_processing/vad/vad_audio_proc_internal.h - webrtc_dsp/modules/audio_processing/vad/pitch_internal.cc - webrtc_dsp/modules/audio_processing/vad/vad_circular_buffer.cc - webrtc_dsp/modules/audio_processing/vad/vad_circular_buffer.h - webrtc_dsp/modules/audio_processing/vad/pitch_based_vad.h - webrtc_dsp/modules/audio_processing/vad/vad_audio_proc.cc - webrtc_dsp/modules/audio_processing/vad/pole_zero_filter.cc - webrtc_dsp/modules/audio_processing/vad/pole_zero_filter.h - webrtc_dsp/modules/audio_processing/vad/pitch_based_vad.cc - webrtc_dsp/modules/audio_processing/vad/gmm.h - webrtc_dsp/modules/audio_processing/vad/common.h - webrtc_dsp/modules/audio_processing/vad/vad_audio_proc.h - webrtc_dsp/modules/audio_processing/vad/voice_gmm_tables.h - webrtc_dsp/modules/audio_processing/vad/noise_gmm_tables.h - webrtc_dsp/modules/audio_processing/vad/pitch_internal.h - webrtc_dsp/modules/audio_processing/vad/gmm.cc - webrtc_dsp/modules/audio_processing/vad/standalone_vad.h - webrtc_dsp/modules/audio_processing/vad/voice_activity_detector.h - webrtc_dsp/modules/audio_processing/utility/delay_estimator_internal.h - webrtc_dsp/modules/audio_processing/utility/ooura_fft.cc - webrtc_dsp/modules/audio_processing/utility/ooura_fft.h - webrtc_dsp/modules/audio_processing/utility/delay_estimator_wrapper.cc - webrtc_dsp/modules/audio_processing/utility/ooura_fft_sse2.cc - webrtc_dsp/modules/audio_processing/utility/delay_estimator.cc - webrtc_dsp/modules/audio_processing/utility/block_mean_calculator.h - webrtc_dsp/modules/audio_processing/utility/block_mean_calculator.cc - webrtc_dsp/modules/audio_processing/utility/delay_estimator.h - webrtc_dsp/modules/audio_processing/utility/ooura_fft_tables_common.h - webrtc_dsp/modules/audio_processing/utility/delay_estimator_wrapper.h - webrtc_dsp/common_audio/mocks/mock_smoothing_filter.h - webrtc_dsp/common_audio/wav_file.h - webrtc_dsp/common_audio/window_generator.cc - webrtc_dsp/common_audio/channel_buffer.cc - webrtc_dsp/common_audio/fir_filter_factory.cc - webrtc_dsp/common_audio/sparse_fir_filter.h - webrtc_dsp/common_audio/fir_filter_sse.h - webrtc_dsp/common_audio/window_generator.h - webrtc_dsp/common_audio/ring_buffer.h - webrtc_dsp/common_audio/fir_filter.h - webrtc_dsp/common_audio/include/audio_util.h - webrtc_dsp/common_audio/wav_header.cc - webrtc_dsp/common_audio/real_fourier_ooura.cc - webrtc_dsp/common_audio/audio_util.cc - webrtc_dsp/common_audio/real_fourier_ooura.h - webrtc_dsp/common_audio/fir_filter_sse.cc - webrtc_dsp/common_audio/smoothing_filter.h - webrtc_dsp/common_audio/resampler/push_sinc_resampler.cc - webrtc_dsp/common_audio/resampler/sinc_resampler.h - webrtc_dsp/common_audio/resampler/resampler.cc - webrtc_dsp/common_audio/resampler/sinc_resampler_sse.cc - webrtc_dsp/common_audio/resampler/include/push_resampler.h - webrtc_dsp/common_audio/resampler/include/resampler.h - webrtc_dsp/common_audio/resampler/push_sinc_resampler.h - webrtc_dsp/common_audio/resampler/push_resampler.cc - webrtc_dsp/common_audio/resampler/sinusoidal_linear_chirp_source.h - webrtc_dsp/common_audio/resampler/sinc_resampler.cc - webrtc_dsp/common_audio/resampler/sinusoidal_linear_chirp_source.cc - webrtc_dsp/common_audio/fir_filter_factory.h - webrtc_dsp/common_audio/audio_converter.h - webrtc_dsp/common_audio/wav_file.cc - webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c - webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.h - webrtc_dsp/common_audio/third_party/fft4g/fft4g.c - webrtc_dsp/common_audio/third_party/fft4g/fft4g.h - webrtc_dsp/common_audio/audio_converter.cc - webrtc_dsp/common_audio/real_fourier.cc - webrtc_dsp/common_audio/channel_buffer.h - webrtc_dsp/common_audio/real_fourier.h - webrtc_dsp/common_audio/sparse_fir_filter.cc - webrtc_dsp/common_audio/smoothing_filter.cc - webrtc_dsp/common_audio/fir_filter_c.cc - webrtc_dsp/common_audio/ring_buffer.c - webrtc_dsp/common_audio/fir_filter_c.h - webrtc_dsp/common_audio/signal_processing/complex_fft_tables.h - webrtc_dsp/common_audio/signal_processing/complex_fft.c - webrtc_dsp/common_audio/signal_processing/filter_ma_fast_q12.c - webrtc_dsp/common_audio/signal_processing/levinson_durbin.c - webrtc_dsp/common_audio/signal_processing/dot_product_with_scale.cc - webrtc_dsp/common_audio/signal_processing/auto_corr_to_refl_coef.c - webrtc_dsp/common_audio/signal_processing/resample_by_2_internal.c - webrtc_dsp/common_audio/signal_processing/energy.c - webrtc_dsp/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c - webrtc_dsp/common_audio/signal_processing/downsample_fast.c - webrtc_dsp/common_audio/signal_processing/splitting_filter1.c - webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12.c - webrtc_dsp/common_audio/signal_processing/spl_init.c - webrtc_dsp/common_audio/signal_processing/lpc_to_refl_coef.c - webrtc_dsp/common_audio/signal_processing/cross_correlation.c - webrtc_dsp/common_audio/signal_processing/include/signal_processing_library.h - webrtc_dsp/common_audio/signal_processing/include/real_fft.h - webrtc_dsp/common_audio/signal_processing/include/spl_inl.h - webrtc_dsp/common_audio/signal_processing/division_operations.c - webrtc_dsp/common_audio/signal_processing/auto_correlation.c - webrtc_dsp/common_audio/signal_processing/get_scaling_square.c - webrtc_dsp/common_audio/signal_processing/dot_product_with_scale.h - webrtc_dsp/common_audio/signal_processing/resample_by_2_internal.h - webrtc_dsp/common_audio/signal_processing/resample.c - webrtc_dsp/common_audio/signal_processing/min_max_operations.c - webrtc_dsp/common_audio/signal_processing/refl_coef_to_lpc.c - webrtc_dsp/common_audio/signal_processing/filter_ar.c - webrtc_dsp/common_audio/signal_processing/vector_scaling_operations.c - webrtc_dsp/common_audio/signal_processing/resample_fractional.c - webrtc_dsp/common_audio/signal_processing/real_fft.c - webrtc_dsp/common_audio/signal_processing/ilbc_specific_functions.c - webrtc_dsp/common_audio/signal_processing/complex_bit_reverse.c - webrtc_dsp/common_audio/signal_processing/randomization_functions.c - webrtc_dsp/common_audio/signal_processing/copy_set_operations.c - webrtc_dsp/common_audio/signal_processing/resample_by_2.c - webrtc_dsp/common_audio/signal_processing/get_hanning_window.c - webrtc_dsp/common_audio/signal_processing/resample_48khz.c - webrtc_dsp/common_audio/signal_processing/spl_inl.c - webrtc_dsp/common_audio/signal_processing/spl_sqrt.c - webrtc_dsp/common_audio/wav_header.h - webrtc_dsp/common_audio/vad/vad_sp.c - webrtc_dsp/common_audio/vad/vad.cc - webrtc_dsp/common_audio/vad/webrtc_vad.c - webrtc_dsp/common_audio/vad/vad_core.h - webrtc_dsp/common_audio/vad/include/vad.h - webrtc_dsp/common_audio/vad/include/webrtc_vad.h - webrtc_dsp/common_audio/vad/vad_gmm.h - webrtc_dsp/common_audio/vad/vad_filterbank.c - webrtc_dsp/common_audio/vad/vad_core.c - webrtc_dsp/common_audio/vad/vad_sp.h - webrtc_dsp/common_audio/vad/vad_filterbank.h - webrtc_dsp/common_audio/vad/vad_gmm.c - - # ARM/NEON sources - # TODO check if there's a good way to make these compile with ARM ports of TDesktop - # webrtc_dsp/modules/audio_processing/ns/nsx_core_neon.c - # webrtc_dsp/modules/audio_processing/aec/aec_core_neon.cc - # webrtc_dsp/modules/audio_processing/aecm/aecm_core_neon.cc - # webrtc_dsp/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h - # webrtc_dsp/modules/audio_processing/utility/ooura_fft_neon.cc - # webrtc_dsp/common_audio/fir_filter_neon.cc - # webrtc_dsp/common_audio/resampler/sinc_resampler_neon.cc - # webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S - # webrtc_dsp/common_audio/fir_filter_neon.h - # webrtc_dsp/common_audio/signal_processing/downsample_fast_neon.c - # webrtc_dsp/common_audio/signal_processing/complex_bit_reverse_arm.S - # webrtc_dsp/common_audio/signal_processing/include/spl_inl_armv7.h - # webrtc_dsp/common_audio/signal_processing/min_max_operations_neon.c - # webrtc_dsp/common_audio/signal_processing/cross_correlation_neon.c - # webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12_armv7.S ) + if (NOT WIN32 OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Doesn't build with mingw for now + nice_target_sources(lib_tgvoip ${tgvoip_loc} + PRIVATE + # WebRTC APM + webrtc_dsp/system_wrappers/include/field_trial.h + webrtc_dsp/system_wrappers/include/cpu_features_wrapper.h + webrtc_dsp/system_wrappers/include/asm_defines.h + webrtc_dsp/system_wrappers/include/metrics.h + webrtc_dsp/system_wrappers/include/compile_assert_c.h + webrtc_dsp/system_wrappers/source/field_trial.cc + webrtc_dsp/system_wrappers/source/metrics.cc + webrtc_dsp/system_wrappers/source/cpu_features.cc + webrtc_dsp/typedefs.h + webrtc_dsp/absl/strings/internal/memutil.h + webrtc_dsp/absl/strings/internal/memutil.cc + webrtc_dsp/absl/strings/string_view.cc + webrtc_dsp/absl/strings/ascii.h + webrtc_dsp/absl/strings/ascii.cc + webrtc_dsp/absl/strings/string_view.h + webrtc_dsp/absl/types/optional.h + webrtc_dsp/absl/types/bad_optional_access.h + webrtc_dsp/absl/types/bad_optional_access.cc + webrtc_dsp/absl/types/optional.cc + webrtc_dsp/absl/memory/memory.h + webrtc_dsp/absl/meta/type_traits.h + webrtc_dsp/absl/algorithm/algorithm.h + webrtc_dsp/absl/container/inlined_vector.h + webrtc_dsp/absl/base/policy_checks.h + webrtc_dsp/absl/base/port.h + webrtc_dsp/absl/base/config.h + webrtc_dsp/absl/base/internal/raw_logging.cc + webrtc_dsp/absl/base/internal/throw_delegate.cc + webrtc_dsp/absl/base/internal/invoke.h + webrtc_dsp/absl/base/internal/inline_variable.h + webrtc_dsp/absl/base/internal/atomic_hook.h + webrtc_dsp/absl/base/internal/identity.h + webrtc_dsp/absl/base/internal/raw_logging.h + webrtc_dsp/absl/base/internal/throw_delegate.h + webrtc_dsp/absl/base/attributes.h + webrtc_dsp/absl/base/macros.h + webrtc_dsp/absl/base/optimization.h + webrtc_dsp/absl/base/log_severity.h + webrtc_dsp/absl/utility/utility.h + webrtc_dsp/rtc_base/string_to_number.h + webrtc_dsp/rtc_base/constructormagic.h + webrtc_dsp/rtc_base/race_checker.cc + webrtc_dsp/rtc_base/strings/string_builder.h + webrtc_dsp/rtc_base/strings/string_builder.cc + webrtc_dsp/rtc_base/event_tracer.h + webrtc_dsp/rtc_base/stringencode.h + webrtc_dsp/rtc_base/memory/aligned_malloc.cc + webrtc_dsp/rtc_base/memory/aligned_malloc.h + webrtc_dsp/rtc_base/timeutils.cc + webrtc_dsp/rtc_base/event.h + webrtc_dsp/rtc_base/ignore_wundef.h + webrtc_dsp/rtc_base/stringutils.h + webrtc_dsp/rtc_base/arraysize.h + webrtc_dsp/rtc_base/platform_file.cc + webrtc_dsp/rtc_base/swap_queue.h + webrtc_dsp/rtc_base/string_to_number.cc + webrtc_dsp/rtc_base/trace_event.h + webrtc_dsp/rtc_base/checks.h + webrtc_dsp/rtc_base/deprecation.h + webrtc_dsp/rtc_base/thread_checker_impl.cc + webrtc_dsp/rtc_base/sanitizer.h + webrtc_dsp/rtc_base/scoped_ref_ptr.h + webrtc_dsp/rtc_base/logging.h + webrtc_dsp/rtc_base/logging_mac.h + webrtc_dsp/rtc_base/logging_mac.mm + webrtc_dsp/rtc_base/timeutils.h + webrtc_dsp/rtc_base/atomicops.h + webrtc_dsp/rtc_base/stringencode.cc + webrtc_dsp/rtc_base/stringutils.cc + webrtc_dsp/rtc_base/checks.cc + webrtc_dsp/rtc_base/numerics/safe_minmax.h + webrtc_dsp/rtc_base/numerics/safe_conversions.h + webrtc_dsp/rtc_base/numerics/safe_conversions_impl.h + webrtc_dsp/rtc_base/numerics/safe_compare.h + webrtc_dsp/rtc_base/system/unused.h + webrtc_dsp/rtc_base/system/inline.h + webrtc_dsp/rtc_base/system/ignore_warnings.h + webrtc_dsp/rtc_base/system/asm_defines.h + webrtc_dsp/rtc_base/system/rtc_export.h + webrtc_dsp/rtc_base/system/arch.h + webrtc_dsp/rtc_base/platform_thread.cc + webrtc_dsp/rtc_base/platform_thread.h + webrtc_dsp/rtc_base/platform_thread_types.h + webrtc_dsp/rtc_base/protobuf_utils.h + webrtc_dsp/rtc_base/thread_annotations.h + webrtc_dsp/rtc_base/gtest_prod_util.h + webrtc_dsp/rtc_base/function_view.h + webrtc_dsp/rtc_base/criticalsection.h + webrtc_dsp/rtc_base/criticalsection.cc + webrtc_dsp/rtc_base/platform_thread_types.cc + webrtc_dsp/rtc_base/refcount.h + webrtc_dsp/rtc_base/event.cc + webrtc_dsp/rtc_base/thread_checker_impl.h + webrtc_dsp/rtc_base/event_tracer.cc + webrtc_dsp/rtc_base/compile_assert_c.h + webrtc_dsp/rtc_base/logging_webrtc.cc + webrtc_dsp/rtc_base/type_traits.h + webrtc_dsp/rtc_base/platform_file.h + webrtc_dsp/rtc_base/refcounter.h + webrtc_dsp/rtc_base/logging_mac.h + webrtc_dsp/rtc_base/thread_checker.h + webrtc_dsp/rtc_base/race_checker.h + webrtc_dsp/rtc_base/refcountedobject.h + webrtc_dsp/third_party/rnnoise/src/rnn_vad_weights.cc + webrtc_dsp/third_party/rnnoise/src/rnn_activations.h + webrtc_dsp/third_party/rnnoise/src/kiss_fft.h + webrtc_dsp/third_party/rnnoise/src/kiss_fft.cc + webrtc_dsp/third_party/rnnoise/src/rnn_vad_weights.h + webrtc_dsp/api/audio/audio_frame.cc + webrtc_dsp/api/audio/echo_canceller3_config.h + webrtc_dsp/api/audio/echo_control.h + webrtc_dsp/api/audio/audio_frame.h + webrtc_dsp/api/audio/echo_canceller3_config.cc + webrtc_dsp/api/audio/echo_canceller3_factory.h + webrtc_dsp/api/audio/echo_canceller3_factory.cc + webrtc_dsp/api/array_view.h + webrtc_dsp/modules/third_party/fft/fft.h + webrtc_dsp/modules/third_party/fft/fft.c + webrtc_dsp/modules/audio_coding/codecs/isac/bandwidth_info.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/include/isac.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filterbanks.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/entropy_coding.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_vad.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/settings.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/transform.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/crc.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_filter.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filter_functions.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lattice.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/intialize.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_float_type.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/codec.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/entropy_coding.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_vad.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/structs.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filter_functions.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_filter.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/crc.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode_bwe.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac.c + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.h + webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_tables.h + webrtc_dsp/modules/audio_processing/rms_level.cc + webrtc_dsp/modules/audio_processing/echo_detector/moving_max.h + webrtc_dsp/modules/audio_processing/echo_detector/circular_buffer.h + webrtc_dsp/modules/audio_processing/echo_detector/normalized_covariance_estimator.h + webrtc_dsp/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc + webrtc_dsp/modules/audio_processing/echo_detector/moving_max.cc + webrtc_dsp/modules/audio_processing/echo_detector/circular_buffer.cc + webrtc_dsp/modules/audio_processing/echo_detector/mean_variance_estimator.cc + webrtc_dsp/modules/audio_processing/echo_detector/mean_variance_estimator.h + webrtc_dsp/modules/audio_processing/gain_control_for_experimental_agc.h + webrtc_dsp/modules/audio_processing/splitting_filter.cc + webrtc_dsp/modules/audio_processing/gain_control_impl.cc + webrtc_dsp/modules/audio_processing/rms_level.h + webrtc_dsp/modules/audio_processing/ns/ns_core.h + webrtc_dsp/modules/audio_processing/ns/nsx_core.c + webrtc_dsp/modules/audio_processing/ns/noise_suppression_x.c + webrtc_dsp/modules/audio_processing/ns/nsx_core_c.c + webrtc_dsp/modules/audio_processing/ns/defines.h + webrtc_dsp/modules/audio_processing/ns/noise_suppression.h + webrtc_dsp/modules/audio_processing/ns/ns_core.c + webrtc_dsp/modules/audio_processing/ns/nsx_core.h + webrtc_dsp/modules/audio_processing/ns/windows_private.h + webrtc_dsp/modules/audio_processing/ns/noise_suppression_x.h + webrtc_dsp/modules/audio_processing/ns/noise_suppression.c + webrtc_dsp/modules/audio_processing/ns/nsx_defines.h + webrtc_dsp/modules/audio_processing/residual_echo_detector.h + webrtc_dsp/modules/audio_processing/audio_processing_impl.h + webrtc_dsp/modules/audio_processing/audio_buffer.cc + webrtc_dsp/modules/audio_processing/typing_detection.cc + webrtc_dsp/modules/audio_processing/render_queue_item_verifier.h + webrtc_dsp/modules/audio_processing/include/audio_generator.h + webrtc_dsp/modules/audio_processing/include/config.h + webrtc_dsp/modules/audio_processing/include/audio_frame_view.h + webrtc_dsp/modules/audio_processing/include/mock_audio_processing.h + webrtc_dsp/modules/audio_processing/include/gain_control.h + webrtc_dsp/modules/audio_processing/include/audio_generator_factory.h + webrtc_dsp/modules/audio_processing/include/audio_processing_statistics.cc + webrtc_dsp/modules/audio_processing/include/audio_generator_factory.cc + webrtc_dsp/modules/audio_processing/include/aec_dump.cc + webrtc_dsp/modules/audio_processing/include/aec_dump.h + webrtc_dsp/modules/audio_processing/include/audio_processing_statistics.h + webrtc_dsp/modules/audio_processing/include/audio_processing.h + webrtc_dsp/modules/audio_processing/include/audio_processing.cc + webrtc_dsp/modules/audio_processing/include/config.cc + webrtc_dsp/modules/audio_processing/agc2/interpolated_gain_curve.h + webrtc_dsp/modules/audio_processing/agc2/biquad_filter.h + webrtc_dsp/modules/audio_processing/agc2/interpolated_gain_curve.cc + webrtc_dsp/modules/audio_processing/agc2/agc2_common.cc + webrtc_dsp/modules/audio_processing/agc2/agc2_testing_common.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator.h + webrtc_dsp/modules/audio_processing/agc2/gain_applier.cc + webrtc_dsp/modules/audio_processing/agc2/signal_classifier.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_agc.cc + webrtc_dsp/modules/audio_processing/agc2/adaptive_digital_gain_applier.cc + webrtc_dsp/modules/audio_processing/agc2/limiter.cc + webrtc_dsp/modules/audio_processing/agc2/saturation_protector.cc + webrtc_dsp/modules/audio_processing/agc2/vector_float_frame.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/sequence_buffer.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/rnn.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/rnn.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/test_utils.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_info.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/lp_residual.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/ring_buffer.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/symmetric_matrix_buffer.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/features_extraction.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/common.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/fft_util.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search.h + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/features_extraction.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/fft_util.cc + webrtc_dsp/modules/audio_processing/agc2/rnn_vad/lp_residual.cc + webrtc_dsp/modules/audio_processing/agc2/fixed_gain_controller.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.cc + webrtc_dsp/modules/audio_processing/agc2/vector_float_frame.cc + webrtc_dsp/modules/audio_processing/agc2/down_sampler.h + webrtc_dsp/modules/audio_processing/agc2/noise_level_estimator.cc + webrtc_dsp/modules/audio_processing/agc2/agc2_testing_common.cc + webrtc_dsp/modules/audio_processing/agc2/fixed_digital_level_estimator.cc + webrtc_dsp/modules/audio_processing/agc2/fixed_gain_controller.cc + webrtc_dsp/modules/audio_processing/agc2/saturation_protector.h + webrtc_dsp/modules/audio_processing/agc2/vad_with_level.cc + webrtc_dsp/modules/audio_processing/agc2/limiter_db_gain_curve.cc + webrtc_dsp/modules/audio_processing/agc2/agc2_common.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_digital_gain_applier.h + webrtc_dsp/modules/audio_processing/agc2/vad_with_level.h + webrtc_dsp/modules/audio_processing/agc2/limiter_db_gain_curve.h + webrtc_dsp/modules/audio_processing/agc2/fixed_digital_level_estimator.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_agc.h + webrtc_dsp/modules/audio_processing/agc2/gain_applier.h + webrtc_dsp/modules/audio_processing/agc2/down_sampler.cc + webrtc_dsp/modules/audio_processing/agc2/noise_level_estimator.h + webrtc_dsp/modules/audio_processing/agc2/signal_classifier.cc + webrtc_dsp/modules/audio_processing/agc2/noise_spectrum_estimator.cc + webrtc_dsp/modules/audio_processing/agc2/compute_interpolated_gain_curve.cc + webrtc_dsp/modules/audio_processing/agc2/compute_interpolated_gain_curve.h + webrtc_dsp/modules/audio_processing/agc2/biquad_filter.cc + webrtc_dsp/modules/audio_processing/agc2/noise_spectrum_estimator.h + webrtc_dsp/modules/audio_processing/agc2/limiter.h + webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc + webrtc_dsp/modules/audio_processing/transient/moving_moments.cc + webrtc_dsp/modules/audio_processing/transient/transient_detector.h + webrtc_dsp/modules/audio_processing/transient/wpd_tree.cc + webrtc_dsp/modules/audio_processing/transient/transient_suppressor.h + webrtc_dsp/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h + webrtc_dsp/modules/audio_processing/transient/common.h + webrtc_dsp/modules/audio_processing/transient/wpd_node.h + webrtc_dsp/modules/audio_processing/transient/moving_moments.h + webrtc_dsp/modules/audio_processing/transient/wpd_tree.h + webrtc_dsp/modules/audio_processing/transient/wpd_node.cc + webrtc_dsp/modules/audio_processing/transient/transient_suppressor.cc + webrtc_dsp/modules/audio_processing/transient/transient_detector.cc + webrtc_dsp/modules/audio_processing/transient/dyadic_decimator.h + webrtc_dsp/modules/audio_processing/low_cut_filter.cc + webrtc_dsp/modules/audio_processing/noise_suppression_impl.h + webrtc_dsp/modules/audio_processing/level_estimator_impl.cc + webrtc_dsp/modules/audio_processing/three_band_filter_bank.cc + webrtc_dsp/modules/audio_processing/aec/echo_cancellation.cc + webrtc_dsp/modules/audio_processing/aec/aec_resampler.h + webrtc_dsp/modules/audio_processing/aec/aec_resampler.cc + webrtc_dsp/modules/audio_processing/aec/echo_cancellation.h + webrtc_dsp/modules/audio_processing/aec/aec_core.cc + webrtc_dsp/modules/audio_processing/aec/aec_core.h + webrtc_dsp/modules/audio_processing/aec/aec_core_optimized_methods.h + webrtc_dsp/modules/audio_processing/aec/aec_core_sse2.cc + webrtc_dsp/modules/audio_processing/aec/aec_common.h + webrtc_dsp/modules/audio_processing/voice_detection_impl.h + webrtc_dsp/modules/audio_processing/voice_detection_impl.cc + webrtc_dsp/modules/audio_processing/echo_cancellation_impl.cc + webrtc_dsp/modules/audio_processing/gain_control_for_experimental_agc.cc + webrtc_dsp/modules/audio_processing/agc/agc.cc + webrtc_dsp/modules/audio_processing/agc/loudness_histogram.cc + webrtc_dsp/modules/audio_processing/agc/agc_manager_direct.cc + webrtc_dsp/modules/audio_processing/agc/legacy/analog_agc.h + webrtc_dsp/modules/audio_processing/agc/legacy/gain_control.h + webrtc_dsp/modules/audio_processing/agc/legacy/digital_agc.h + webrtc_dsp/modules/audio_processing/agc/legacy/analog_agc.c + webrtc_dsp/modules/audio_processing/agc/legacy/digital_agc.c + webrtc_dsp/modules/audio_processing/agc/utility.cc + webrtc_dsp/modules/audio_processing/agc/mock_agc.h + webrtc_dsp/modules/audio_processing/agc/loudness_histogram.h + webrtc_dsp/modules/audio_processing/agc/gain_map_internal.h + webrtc_dsp/modules/audio_processing/agc/utility.h + webrtc_dsp/modules/audio_processing/agc/agc_manager_direct.h + webrtc_dsp/modules/audio_processing/agc/agc.h + webrtc_dsp/modules/audio_processing/common.h + webrtc_dsp/modules/audio_processing/audio_processing_impl.cc + webrtc_dsp/modules/audio_processing/audio_buffer.h + webrtc_dsp/modules/audio_processing/echo_control_mobile_impl.h + webrtc_dsp/modules/audio_processing/splitting_filter.h + webrtc_dsp/modules/audio_processing/low_cut_filter.h + webrtc_dsp/modules/audio_processing/audio_generator/file_audio_generator.h + webrtc_dsp/modules/audio_processing/audio_generator/file_audio_generator.cc + webrtc_dsp/modules/audio_processing/gain_controller2.cc + webrtc_dsp/modules/audio_processing/three_band_filter_bank.h + webrtc_dsp/modules/audio_processing/residual_echo_detector.cc + webrtc_dsp/modules/audio_processing/echo_cancellation_impl.h + webrtc_dsp/modules/audio_processing/noise_suppression_impl.cc + webrtc_dsp/modules/audio_processing/level_estimator_impl.h + webrtc_dsp/modules/audio_processing/gain_controller2.h + webrtc_dsp/modules/audio_processing/aecm/aecm_core.h + webrtc_dsp/modules/audio_processing/aecm/aecm_defines.h + webrtc_dsp/modules/audio_processing/aecm/aecm_core.cc + webrtc_dsp/modules/audio_processing/aecm/aecm_core_c.cc + webrtc_dsp/modules/audio_processing/aecm/echo_control_mobile.h + webrtc_dsp/modules/audio_processing/aecm/echo_control_mobile.cc + webrtc_dsp/modules/audio_processing/aec3/render_reverb_model.cc + webrtc_dsp/modules/audio_processing/aec3/downsampled_render_buffer.h + webrtc_dsp/modules/audio_processing/aec3/subtractor_output_analyzer.h + webrtc_dsp/modules/audio_processing/aec3/reverb_model_fallback.cc + webrtc_dsp/modules/audio_processing/aec3/residual_echo_estimator.h + webrtc_dsp/modules/audio_processing/aec3/shadow_filter_update_gain.h + webrtc_dsp/modules/audio_processing/aec3/echo_remover_metrics.cc + webrtc_dsp/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer2.cc + webrtc_dsp/modules/audio_processing/aec3/aec_state.h + webrtc_dsp/modules/audio_processing/aec3/suppression_filter.h + webrtc_dsp/modules/audio_processing/aec3/echo_path_variability.cc + webrtc_dsp/modules/audio_processing/aec3/frame_blocker.cc + webrtc_dsp/modules/audio_processing/aec3/subtractor.cc + webrtc_dsp/modules/audio_processing/aec3/block_delay_buffer.h + webrtc_dsp/modules/audio_processing/aec3/adaptive_fir_filter.h + webrtc_dsp/modules/audio_processing/aec3/cascaded_biquad_filter.h + webrtc_dsp/modules/audio_processing/aec3/matched_filter.h + webrtc_dsp/modules/audio_processing/aec3/subtractor_output.h + webrtc_dsp/modules/audio_processing/aec3/render_signal_analyzer.h + webrtc_dsp/modules/audio_processing/aec3/aec3_fft.cc + webrtc_dsp/modules/audio_processing/aec3/aec3_fft.h + webrtc_dsp/modules/audio_processing/aec3/echo_remover_metrics.h + webrtc_dsp/modules/audio_processing/aec3/fullband_erle_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/suppression_filter.cc + webrtc_dsp/modules/audio_processing/aec3/block_processor.cc + webrtc_dsp/modules/audio_processing/aec3/filter_analyzer.h + webrtc_dsp/modules/audio_processing/aec3/subtractor.h + webrtc_dsp/modules/audio_processing/aec3/echo_path_delay_estimator.h + webrtc_dsp/modules/audio_processing/aec3/subband_erle_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_controller_metrics.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/block_processor_metrics.h + webrtc_dsp/modules/audio_processing/aec3/vector_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/erl_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/aec_state.cc + webrtc_dsp/modules/audio_processing/aec3/adaptive_fir_filter.cc + webrtc_dsp/modules/audio_processing/aec3/fft_data.h + webrtc_dsp/modules/audio_processing/aec3/render_delay_controller.cc + webrtc_dsp/modules/audio_processing/aec3/skew_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_controller_metrics.h + webrtc_dsp/modules/audio_processing/aec3/comfort_noise_generator.h + webrtc_dsp/modules/audio_processing/aec3/echo_path_delay_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/erl_estimator.h + webrtc_dsp/modules/audio_processing/aec3/echo_remover.h + webrtc_dsp/modules/audio_processing/aec3/block_framer.cc + webrtc_dsp/modules/audio_processing/aec3/erle_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_model.cc + webrtc_dsp/modules/audio_processing/aec3/cascaded_biquad_filter.cc + webrtc_dsp/modules/audio_processing/aec3/matrix_buffer.h + webrtc_dsp/modules/audio_processing/aec3/render_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_model_estimator.h + webrtc_dsp/modules/audio_processing/aec3/subtractor_output.cc + webrtc_dsp/modules/audio_processing/aec3/stationarity_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/render_signal_analyzer.cc + webrtc_dsp/modules/audio_processing/aec3/echo_path_variability.h + webrtc_dsp/modules/audio_processing/aec3/moving_average.h + webrtc_dsp/modules/audio_processing/aec3/render_reverb_model.h + webrtc_dsp/modules/audio_processing/aec3/subtractor_output_analyzer.cc + webrtc_dsp/modules/audio_processing/aec3/suppression_gain.cc + webrtc_dsp/modules/audio_processing/aec3/echo_audibility.cc + webrtc_dsp/modules/audio_processing/aec3/block_processor_metrics.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_controller.h + webrtc_dsp/modules/audio_processing/aec3/suppression_gain.h + webrtc_dsp/modules/audio_processing/aec3/moving_average.cc + webrtc_dsp/modules/audio_processing/aec3/erle_estimator.h + webrtc_dsp/modules/audio_processing/aec3/subband_erle_estimator.h + webrtc_dsp/modules/audio_processing/aec3/reverb_model_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/aec3_common.cc + webrtc_dsp/modules/audio_processing/aec3/residual_echo_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/block_processor.h + webrtc_dsp/modules/audio_processing/aec3/fullband_erle_estimator.h + webrtc_dsp/modules/audio_processing/aec3/matched_filter.cc + webrtc_dsp/modules/audio_processing/aec3/stationarity_estimator.h + webrtc_dsp/modules/audio_processing/aec3/echo_canceller3.h + webrtc_dsp/modules/audio_processing/aec3/skew_estimator.h + webrtc_dsp/modules/audio_processing/aec3/reverb_decay_estimator.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_controller2.cc + webrtc_dsp/modules/audio_processing/aec3/render_buffer.h + webrtc_dsp/modules/audio_processing/aec3/suppression_gain_limiter.cc + webrtc_dsp/modules/audio_processing/aec3/main_filter_update_gain.cc + webrtc_dsp/modules/audio_processing/aec3/echo_remover.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_model_fallback.h + webrtc_dsp/modules/audio_processing/aec3/downsampled_render_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/vector_buffer.h + webrtc_dsp/modules/audio_processing/aec3/matrix_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_frequency_response.h + webrtc_dsp/modules/audio_processing/aec3/echo_audibility.h + webrtc_dsp/modules/audio_processing/aec3/fft_buffer.h + webrtc_dsp/modules/audio_processing/aec3/block_processor2.cc + webrtc_dsp/modules/audio_processing/aec3/echo_canceller3.cc + webrtc_dsp/modules/audio_processing/aec3/block_delay_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/aec3_common.h + webrtc_dsp/modules/audio_processing/aec3/fft_buffer.cc + webrtc_dsp/modules/audio_processing/aec3/vector_math.h + webrtc_dsp/modules/audio_processing/aec3/decimator.h + webrtc_dsp/modules/audio_processing/aec3/frame_blocker.h + webrtc_dsp/modules/audio_processing/aec3/block_framer.h + webrtc_dsp/modules/audio_processing/aec3/suppression_gain_limiter.h + webrtc_dsp/modules/audio_processing/aec3/delay_estimate.h + webrtc_dsp/modules/audio_processing/aec3/comfort_noise_generator.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_model.h + webrtc_dsp/modules/audio_processing/aec3/main_filter_update_gain.h + webrtc_dsp/modules/audio_processing/aec3/matched_filter_lag_aggregator.h + webrtc_dsp/modules/audio_processing/aec3/shadow_filter_update_gain.cc + webrtc_dsp/modules/audio_processing/aec3/filter_analyzer.cc + webrtc_dsp/modules/audio_processing/aec3/reverb_decay_estimator.h + webrtc_dsp/modules/audio_processing/aec3/reverb_frequency_response.cc + webrtc_dsp/modules/audio_processing/aec3/decimator.cc + webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer.h + webrtc_dsp/modules/audio_processing/echo_control_mobile_impl.cc + webrtc_dsp/modules/audio_processing/gain_control_impl.h + webrtc_dsp/modules/audio_processing/typing_detection.h + webrtc_dsp/modules/audio_processing/logging/apm_data_dumper.cc + webrtc_dsp/modules/audio_processing/logging/apm_data_dumper.h + webrtc_dsp/modules/audio_processing/vad/voice_activity_detector.cc + webrtc_dsp/modules/audio_processing/vad/standalone_vad.cc + webrtc_dsp/modules/audio_processing/vad/vad_audio_proc_internal.h + webrtc_dsp/modules/audio_processing/vad/pitch_internal.cc + webrtc_dsp/modules/audio_processing/vad/vad_circular_buffer.cc + webrtc_dsp/modules/audio_processing/vad/vad_circular_buffer.h + webrtc_dsp/modules/audio_processing/vad/pitch_based_vad.h + webrtc_dsp/modules/audio_processing/vad/vad_audio_proc.cc + webrtc_dsp/modules/audio_processing/vad/pole_zero_filter.cc + webrtc_dsp/modules/audio_processing/vad/pole_zero_filter.h + webrtc_dsp/modules/audio_processing/vad/pitch_based_vad.cc + webrtc_dsp/modules/audio_processing/vad/gmm.h + webrtc_dsp/modules/audio_processing/vad/common.h + webrtc_dsp/modules/audio_processing/vad/vad_audio_proc.h + webrtc_dsp/modules/audio_processing/vad/voice_gmm_tables.h + webrtc_dsp/modules/audio_processing/vad/noise_gmm_tables.h + webrtc_dsp/modules/audio_processing/vad/pitch_internal.h + webrtc_dsp/modules/audio_processing/vad/gmm.cc + webrtc_dsp/modules/audio_processing/vad/standalone_vad.h + webrtc_dsp/modules/audio_processing/vad/voice_activity_detector.h + webrtc_dsp/modules/audio_processing/utility/delay_estimator_internal.h + webrtc_dsp/modules/audio_processing/utility/ooura_fft.cc + webrtc_dsp/modules/audio_processing/utility/ooura_fft.h + webrtc_dsp/modules/audio_processing/utility/delay_estimator_wrapper.cc + webrtc_dsp/modules/audio_processing/utility/ooura_fft_sse2.cc + webrtc_dsp/modules/audio_processing/utility/delay_estimator.cc + webrtc_dsp/modules/audio_processing/utility/block_mean_calculator.h + webrtc_dsp/modules/audio_processing/utility/block_mean_calculator.cc + webrtc_dsp/modules/audio_processing/utility/delay_estimator.h + webrtc_dsp/modules/audio_processing/utility/ooura_fft_tables_common.h + webrtc_dsp/modules/audio_processing/utility/delay_estimator_wrapper.h + webrtc_dsp/common_audio/mocks/mock_smoothing_filter.h + webrtc_dsp/common_audio/wav_file.h + webrtc_dsp/common_audio/window_generator.cc + webrtc_dsp/common_audio/channel_buffer.cc + webrtc_dsp/common_audio/fir_filter_factory.cc + webrtc_dsp/common_audio/sparse_fir_filter.h + webrtc_dsp/common_audio/fir_filter_sse.h + webrtc_dsp/common_audio/window_generator.h + webrtc_dsp/common_audio/ring_buffer.h + webrtc_dsp/common_audio/fir_filter.h + webrtc_dsp/common_audio/include/audio_util.h + webrtc_dsp/common_audio/wav_header.cc + webrtc_dsp/common_audio/real_fourier_ooura.cc + webrtc_dsp/common_audio/audio_util.cc + webrtc_dsp/common_audio/real_fourier_ooura.h + webrtc_dsp/common_audio/fir_filter_sse.cc + webrtc_dsp/common_audio/smoothing_filter.h + webrtc_dsp/common_audio/resampler/push_sinc_resampler.cc + webrtc_dsp/common_audio/resampler/sinc_resampler.h + webrtc_dsp/common_audio/resampler/resampler.cc + webrtc_dsp/common_audio/resampler/sinc_resampler_sse.cc + webrtc_dsp/common_audio/resampler/include/push_resampler.h + webrtc_dsp/common_audio/resampler/include/resampler.h + webrtc_dsp/common_audio/resampler/push_sinc_resampler.h + webrtc_dsp/common_audio/resampler/push_resampler.cc + webrtc_dsp/common_audio/resampler/sinusoidal_linear_chirp_source.h + webrtc_dsp/common_audio/resampler/sinc_resampler.cc + webrtc_dsp/common_audio/resampler/sinusoidal_linear_chirp_source.cc + webrtc_dsp/common_audio/fir_filter_factory.h + webrtc_dsp/common_audio/audio_converter.h + webrtc_dsp/common_audio/wav_file.cc + webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c + webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.h + webrtc_dsp/common_audio/third_party/fft4g/fft4g.c + webrtc_dsp/common_audio/third_party/fft4g/fft4g.h + webrtc_dsp/common_audio/audio_converter.cc + webrtc_dsp/common_audio/real_fourier.cc + webrtc_dsp/common_audio/channel_buffer.h + webrtc_dsp/common_audio/real_fourier.h + webrtc_dsp/common_audio/sparse_fir_filter.cc + webrtc_dsp/common_audio/smoothing_filter.cc + webrtc_dsp/common_audio/fir_filter_c.cc + webrtc_dsp/common_audio/ring_buffer.c + webrtc_dsp/common_audio/fir_filter_c.h + webrtc_dsp/common_audio/signal_processing/complex_fft_tables.h + webrtc_dsp/common_audio/signal_processing/complex_fft.c + webrtc_dsp/common_audio/signal_processing/filter_ma_fast_q12.c + webrtc_dsp/common_audio/signal_processing/levinson_durbin.c + webrtc_dsp/common_audio/signal_processing/dot_product_with_scale.cc + webrtc_dsp/common_audio/signal_processing/auto_corr_to_refl_coef.c + webrtc_dsp/common_audio/signal_processing/resample_by_2_internal.c + webrtc_dsp/common_audio/signal_processing/energy.c + webrtc_dsp/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c + webrtc_dsp/common_audio/signal_processing/downsample_fast.c + webrtc_dsp/common_audio/signal_processing/splitting_filter1.c + webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12.c + webrtc_dsp/common_audio/signal_processing/spl_init.c + webrtc_dsp/common_audio/signal_processing/lpc_to_refl_coef.c + webrtc_dsp/common_audio/signal_processing/cross_correlation.c + webrtc_dsp/common_audio/signal_processing/include/signal_processing_library.h + webrtc_dsp/common_audio/signal_processing/include/real_fft.h + webrtc_dsp/common_audio/signal_processing/include/spl_inl.h + webrtc_dsp/common_audio/signal_processing/division_operations.c + webrtc_dsp/common_audio/signal_processing/auto_correlation.c + webrtc_dsp/common_audio/signal_processing/get_scaling_square.c + webrtc_dsp/common_audio/signal_processing/dot_product_with_scale.h + webrtc_dsp/common_audio/signal_processing/resample_by_2_internal.h + webrtc_dsp/common_audio/signal_processing/resample.c + webrtc_dsp/common_audio/signal_processing/min_max_operations.c + webrtc_dsp/common_audio/signal_processing/refl_coef_to_lpc.c + webrtc_dsp/common_audio/signal_processing/filter_ar.c + webrtc_dsp/common_audio/signal_processing/vector_scaling_operations.c + webrtc_dsp/common_audio/signal_processing/resample_fractional.c + webrtc_dsp/common_audio/signal_processing/real_fft.c + webrtc_dsp/common_audio/signal_processing/ilbc_specific_functions.c + webrtc_dsp/common_audio/signal_processing/complex_bit_reverse.c + webrtc_dsp/common_audio/signal_processing/randomization_functions.c + webrtc_dsp/common_audio/signal_processing/copy_set_operations.c + webrtc_dsp/common_audio/signal_processing/resample_by_2.c + webrtc_dsp/common_audio/signal_processing/get_hanning_window.c + webrtc_dsp/common_audio/signal_processing/resample_48khz.c + webrtc_dsp/common_audio/signal_processing/spl_inl.c + webrtc_dsp/common_audio/signal_processing/spl_sqrt.c + webrtc_dsp/common_audio/wav_header.h + webrtc_dsp/common_audio/vad/vad_sp.c + webrtc_dsp/common_audio/vad/vad.cc + webrtc_dsp/common_audio/vad/webrtc_vad.c + webrtc_dsp/common_audio/vad/vad_core.h + webrtc_dsp/common_audio/vad/include/vad.h + webrtc_dsp/common_audio/vad/include/webrtc_vad.h + webrtc_dsp/common_audio/vad/vad_gmm.h + webrtc_dsp/common_audio/vad/vad_filterbank.c + webrtc_dsp/common_audio/vad/vad_core.c + webrtc_dsp/common_audio/vad/vad_sp.h + webrtc_dsp/common_audio/vad/vad_filterbank.h + webrtc_dsp/common_audio/vad/vad_gmm.c + + # ARM/NEON sources + # TODO check if there's a good way to make these compile with ARM ports of TDesktop + # webrtc_dsp/modules/audio_processing/ns/nsx_core_neon.c + # webrtc_dsp/modules/audio_processing/aec/aec_core_neon.cc + # webrtc_dsp/modules/audio_processing/aecm/aecm_core_neon.cc + # webrtc_dsp/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h + # webrtc_dsp/modules/audio_processing/utility/ooura_fft_neon.cc + # webrtc_dsp/common_audio/fir_filter_neon.cc + # webrtc_dsp/common_audio/resampler/sinc_resampler_neon.cc + # webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S + # webrtc_dsp/common_audio/fir_filter_neon.h + # webrtc_dsp/common_audio/signal_processing/downsample_fast_neon.c + # webrtc_dsp/common_audio/signal_processing/complex_bit_reverse_arm.S + # webrtc_dsp/common_audio/signal_processing/include/spl_inl_armv7.h + # webrtc_dsp/common_audio/signal_processing/min_max_operations_neon.c + # webrtc_dsp/common_audio/signal_processing/cross_correlation_neon.c + # webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12_armv7.S + ) + endif() + target_compile_definitions(lib_tgvoip PUBLIC WEBRTC_APM_DEBUG_DUMP=0 @@ -737,16 +744,24 @@ else() ) if (WIN32) - target_compile_options(lib_tgvoip - PRIVATE - /wd4005 - /wd4244 # conversion from 'int' to 'float', possible loss of data (several in webrtc) - /wd5055 # operator '>' deprecated between enumerations and floating-point types - ) - target_compile_definitions(lib_tgvoip - PUBLIC - WEBRTC_WIN - ) + if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options(lib_tgvoip + PRIVATE + /wd4005 + /wd4244 # conversion from 'int' to 'float', possible loss of data (several in webrtc) + /wd5055 # operator '>' deprecated between enumerations and floating-point types + ) + target_compile_definitions(lib_tgvoip + PUBLIC + WEBRTC_WIN + ) + else() + target_compile_definitions(lib_tgvoip + PUBLIC + # Doesn't build with mingw for now + TGVOIP_NO_DSP + ) + endif() elseif (APPLE) target_compile_definitions(lib_tgvoip PUBLIC From 297b5d6a76ab8b8aad13c4c15f4c2f524bec30f6 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 12 May 2020 14:28:45 +0400 Subject: [PATCH 17/21] Update submodules --- Telegram/ThirdParty/libtgvoip | 2 +- Telegram/lib_crl | 2 +- Telegram/lib_ui | 2 +- cmake | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/ThirdParty/libtgvoip b/Telegram/ThirdParty/libtgvoip index a045c9eea..2a05b2249 160000 --- a/Telegram/ThirdParty/libtgvoip +++ b/Telegram/ThirdParty/libtgvoip @@ -1 +1 @@ -Subproject commit a045c9eea47b371c0c514c72c76172a211c894cb +Subproject commit 2a05b22490c79ab4000f759069a2442797af6e9a diff --git a/Telegram/lib_crl b/Telegram/lib_crl index 626ff13ec..661ac4f6b 160000 --- a/Telegram/lib_crl +++ b/Telegram/lib_crl @@ -1 +1 @@ -Subproject commit 626ff13ec31b041c1d6481a32814998397fd3b61 +Subproject commit 661ac4f6bdf8991e7d6cac176d32338ac025b637 diff --git a/Telegram/lib_ui b/Telegram/lib_ui index b1d00d0b2..4d2f17d9f 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit b1d00d0b28cfce60d88b1a0a088539980adcfdb5 +Subproject commit 4d2f17d9fca1462ea875957b232b76515a0fd726 diff --git a/cmake b/cmake index a10bb86dc..4ea254886 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit a10bb86dcdfc17a9b7f0c827534e46c8dc54bb8f +Subproject commit 4ea254886efd273cd4b01eb5128fe67d47959e4e From 7883f97c9480f1d5ce2a1a6c01b83a4f605fc3cb Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 17:31:57 +0400 Subject: [PATCH 18/21] Use precise sync of the server unixtime. --- .../SourceFiles/mtproto/session_private.cpp | 58 +++++++++++++++---- .../SourceFiles/mtproto/session_private.h | 6 ++ Telegram/lib_base | 2 +- 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/Telegram/SourceFiles/mtproto/session_private.cpp b/Telegram/SourceFiles/mtproto/session_private.cpp index 1b6159003..8f7aa7c59 100644 --- a/Telegram/SourceFiles/mtproto/session_private.cpp +++ b/Telegram/SourceFiles/mtproto/session_private.cpp @@ -40,6 +40,7 @@ constexpr auto kTestModeDcIdShift = 10000; constexpr auto kCheckSentRequestsEach = 1 * crl::time(1000); constexpr auto kKeyOldEnoughForDestroy = 60 * crl::time(1000); constexpr auto kSentContainerLives = 600 * crl::time(1000); +constexpr auto kFastRequestDuration = crl::time(500); // If we can't connect for this time we will ask _instance to update config. constexpr auto kRequestConfigTimeout = 8 * crl::time(1000); @@ -57,6 +58,8 @@ constexpr auto kSendStateRequestWaiting = crl::time(1000); // How much time to wait for some more requests, when sending msg acks. constexpr auto kAckSendWaiting = 10 * crl::time(1000); +auto SyncTimeRequestDuration = kFastRequestDuration; + using namespace details; [[nodiscard]] QString LogIdsVector(const QVector &ids) { @@ -1467,8 +1470,12 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( return badTime ? HandleResult::Ignored : HandleResult::Success; } - if (badTime && !requestsFixTimeSalt(ids, serverTime, serverSalt)) { - return HandleResult::Ignored; + if (badTime) { + if (!requestsFixTimeSalt(ids, serverTime, serverSalt)) { + return HandleResult::Ignored; + } + } else { + correctUnixtimeByFastRequest(ids, serverTime); } requestsAcked(ids); } return HandleResult::Success; @@ -1520,7 +1527,8 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( if (serverSalt) { _sessionSalt = serverSalt; } - base::unixtime::update(serverTime, true); + + correctUnixtimeWithBadLocal(serverTime); DEBUG_LOG(("Message Info: unixtime updated, now %1, resending in container...").arg(serverTime)); @@ -1530,7 +1538,7 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( if (serverSalt) { _sessionSalt = serverSalt; } - base::unixtime::update(serverTime, true); + correctUnixtimeWithBadLocal(serverTime); badTime = false; } LOG(("Message Info: bad message notification received, msgId %1, error_code %2").arg(data.vbad_msg_id().v).arg(errorCode)); @@ -1580,7 +1588,7 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( } _sessionSalt = data.vnew_server_salt().v; - base::unixtime::update(serverTime); + correctUnixtimeWithBadLocal(serverTime); if (setState(ConnectedState, ConnectingState)) { resendAll(); @@ -1612,7 +1620,7 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( if (serverSalt) { _sessionSalt = serverSalt; // requestsFixTimeSalt with no lookup } - base::unixtime::update(serverTime, true); + correctUnixtimeWithBadLocal(serverTime); DEBUG_LOG(("Message Info: unixtime updated from mtpc_msgs_state_info, now %1").arg(serverTime)); @@ -1956,20 +1964,48 @@ mtpBuffer SessionPrivate::ungzip(const mtpPrime *from, const mtpPrime *end) cons } bool SessionPrivate::requestsFixTimeSalt(const QVector &ids, int32 serverTime, uint64 serverSalt) { - uint32 idsCount = ids.size(); - - for (uint32 i = 0; i < idsCount; ++i) { - if (wasSent(ids[i].v)) {// found such msg_id in recent acked requests or in recent sent requests + for (const auto &id : ids) { + if (wasSent(id.v)) { + // Found such msg_id in recent acked or in recent sent requests. if (serverSalt) { _sessionSalt = serverSalt; } - base::unixtime::update(serverTime, true); + correctUnixtimeWithBadLocal(serverTime); return true; } } return false; } +void SessionPrivate::correctUnixtimeByFastRequest( + const QVector &ids, + TimeId serverTime) { + const auto now = crl::now(); + + QReadLocker locker(_sessionData->haveSentMutex()); + const auto &haveSent = _sessionData->haveSentMap(); + for (const auto &id : ids) { + const auto i = haveSent.find(id.v); + if (i == haveSent.end()) { + continue; + } + const auto duration = (now - i->second->lastSentTime); + if (duration < 0 || duration > SyncTimeRequestDuration) { + continue; + } + locker.unlock(); + + SyncTimeRequestDuration = duration; + base::unixtime::update(serverTime, true); + return; + } +} + +void SessionPrivate::correctUnixtimeWithBadLocal(TimeId serverTime) { + SyncTimeRequestDuration = kFastRequestDuration; + base::unixtime::update(serverTime, true); +} + void SessionPrivate::requestsAcked(const QVector &ids, bool byResponse) { uint32 idsCount = ids.size(); diff --git a/Telegram/SourceFiles/mtproto/session_private.h b/Telegram/SourceFiles/mtproto/session_private.h index fe39450f2..302067c65 100644 --- a/Telegram/SourceFiles/mtproto/session_private.h +++ b/Telegram/SourceFiles/mtproto/session_private.h @@ -139,6 +139,12 @@ private: // if badTime received - search for ids in sessionData->haveSent and sessionData->wereAcked and sync time/salt, return true if found bool requestsFixTimeSalt(const QVector &ids, int32 serverTime, uint64 serverSalt); + // if we had a confirmed fast request use its unixtime as a correct one. + void correctUnixtimeByFastRequest( + const QVector &ids, + TimeId serverTime); + void correctUnixtimeWithBadLocal(TimeId serverTime); + // remove msgs with such ids from sessionData->haveSent, add to sessionData->wereAcked void requestsAcked(const QVector &ids, bool byResponse = false); diff --git a/Telegram/lib_base b/Telegram/lib_base index 9e01ede66..b376282b6 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit 9e01ede6661e2a74697283c7836d4fae433f50ce +Subproject commit b376282b656b13c54cd892e3c2742bb26acf42fe From 2e92441b3afc1548fc4d101a84d12d9a996ce00b Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 19:26:50 +0400 Subject: [PATCH 19/21] Add input method field text edit workaround. --- Telegram/lib_ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 4d2f17d9f..8e2cfbf30 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 4d2f17d9fca1462ea875957b232b76515a0fd726 +Subproject commit 8e2cfbf303a43bbd946279dd2cb394be82a782a0 From 84399286c16aefcf564af123e52abf6563f9b914 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 19:43:39 +0400 Subject: [PATCH 20/21] Update build instructions. --- docs/building-cmake.md | 9 +++------ docs/building-msvc.md | 7 +++---- docs/building-osx.md | 7 +++---- docs/building-xcode.md | 7 +++---- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/docs/building-cmake.md b/docs/building-cmake.md index 0804dd124..aff7821fb 100644 --- a/docs/building-cmake.md +++ b/docs/building-cmake.md @@ -54,7 +54,7 @@ Go to ***BuildPath*** and run git clone https://github.com/desktop-app/patches.git cd patches - git checkout e036126 + git checkout b08b497 cd ../ git clone https://github.com/xiph/opus @@ -228,12 +228,9 @@ Go to ***BuildPath*** and run git clone git://code.qt.io/qt/qt5.git qt_5_12_8 cd qt_5_12_8 - perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg + perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qtx11extras git checkout v5.12.8 - git submodule update qtbase - git submodule update qtwayland - git submodule update qtimageformats - git submodule update qtsvg + git submodule update qtbase qtwayland qtimageformats qtsvg qtx11extras cd qtbase git apply ../../patches/qtbase_5_12_8.diff cd .. diff --git a/docs/building-msvc.md b/docs/building-msvc.md index 23c1db0af..142b4689f 100644 --- a/docs/building-msvc.md +++ b/docs/building-msvc.md @@ -32,7 +32,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath*** cd ThirdParty git clone https://github.com/desktop-app/patches.git cd patches - git checkout e036126 + git checkout b08b497 cd ../ git clone https://chromium.googlesource.com/external/gyp cd gyp @@ -64,7 +64,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath*** git clone https://github.com/desktop-app/patches.git cd patches - git checkout e036126 + git checkout b08b497 cd .. git clone https://github.com/desktop-app/lzma.git @@ -151,8 +151,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath*** cd qt_5_12_8 perl init-repository --module-subset=qtbase,qtimageformats git checkout v5.12.8 - git submodule update qtbase - git submodule update qtimageformats + git submodule update qtbase qtimageformats cd qtbase git apply ../../patches/qtbase_5_12_8.diff cd .. diff --git a/docs/building-osx.md b/docs/building-osx.md index a0148d496..f463842c2 100644 --- a/docs/building-osx.md +++ b/docs/building-osx.md @@ -35,7 +35,7 @@ Go to ***BuildPath*** and run git clone https://github.com/desktop-app/patches.git cd patches - git checkout 395b620 + git checkout b08b497 cd ../ git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git @@ -52,7 +52,7 @@ Go to ***BuildPath*** and run git clone https://github.com/desktop-app/patches.git cd patches - git checkout 395b620 + git checkout b08b497 cd ../ cd xz-5.0.5 @@ -235,8 +235,7 @@ Go to ***BuildPath*** and run cd qt5_6_2 perl init-repository --module-subset=qtbase,qtimageformats git checkout v5.6.2 - git submodule update qtbase - git submodule update qtimageformats + git submodule update qtbase qtimageformats cd qtbase git apply ../../patches/qtbase_5_6_2.diff cd .. diff --git a/docs/building-xcode.md b/docs/building-xcode.md index 91081ccab..1d7f43528 100644 --- a/docs/building-xcode.md +++ b/docs/building-xcode.md @@ -29,7 +29,7 @@ Go to ***BuildPath*** and run git clone https://github.com/desktop-app/patches.git cd patches - git checkout e036126 + git checkout b08b497 cd ../ git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git @@ -47,7 +47,7 @@ Go to ***BuildPath*** and run git clone https://github.com/desktop-app/patches.git cd patches - git checkout e036126 + git checkout b08b497 cd .. xz_ver=5.2.4 @@ -238,8 +238,7 @@ Go to ***BuildPath*** and run cd qt5_12_8 perl init-repository --module-subset=qtbase,qtimageformats git checkout v5.12.8 - git submodule update qtbase - git submodule update qtimageformats + git submodule update qtbase qtimageformats cd qtbase git apply ../../patches/qtbase_5_12_8.diff cd .. From cb5863177fbe284a03bb324222ace74943dc8737 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 20:28:44 +0400 Subject: [PATCH 21/21] Apply edition updates to search result previews. --- Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp | 11 +++++++++++ Telegram/SourceFiles/dialogs/dialogs_inner_widget.h | 1 + Telegram/SourceFiles/dialogs/dialogs_row.h | 5 +++++ Telegram/SourceFiles/dialogs/dialogs_widget.cpp | 4 ++++ Telegram/SourceFiles/dialogs/dialogs_widget.h | 1 + Telegram/SourceFiles/history/history_item.cpp | 2 +- Telegram/SourceFiles/mainwidget.cpp | 4 ++++ Telegram/SourceFiles/mainwidget.h | 1 + 8 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 7ee3a6ca1..a1a7d5ba2 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -1549,6 +1549,17 @@ void InnerWidget::repaintDialogRow(RowDescriptor row) { updateDialogRow(row); } +void InnerWidget::refreshDialogRow(RowDescriptor row) { + if (row.fullId) { + for (const auto &result : _searchResults) { + if (result->item()->fullId() == row.fullId) { + result->invalidateCache(); + } + } + } + repaintDialogRow(row); +} + void InnerWidget::updateSearchResult(not_null peer) { if (_state == WidgetState::Filtered) { if (!_peerSearchResults.empty()) { diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h index f46265770..2618d0ada 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h @@ -92,6 +92,7 @@ public: void removeDialog(Key key); void repaintDialogRow(FilterId filterId, not_null row); void repaintDialogRow(RowDescriptor row); + void refreshDialogRow(RowDescriptor row); void dragLeft(); diff --git a/Telegram/SourceFiles/dialogs/dialogs_row.h b/Telegram/SourceFiles/dialogs/dialogs_row.h index b43b07af2..c717fd202 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_row.h +++ b/Telegram/SourceFiles/dialogs/dialogs_row.h @@ -121,6 +121,11 @@ public: return _item; } + void invalidateCache() { + _cacheFor = nullptr; + _cache = Ui::Text::String(); + } + private: friend class Layout::RowPainter; diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index c2610857b..a509c0077 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -549,6 +549,10 @@ void Widget::repaintDialogRow(RowDescriptor row) { _inner->repaintDialogRow(row); } +void Widget::refreshDialogRow(RowDescriptor row) { + _inner->refreshDialogRow(row); +} + void Widget::jumpToTop() { if (session().supportMode()) { return; diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.h b/Telegram/SourceFiles/dialogs/dialogs_widget.h index fc81317e8..8357bb6b4 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.h +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.h @@ -64,6 +64,7 @@ public: void removeDialog(Key key); void repaintDialogRow(FilterId filterId, not_null row); void repaintDialogRow(RowDescriptor row); + void refreshDialogRow(RowDescriptor row); void jumpToTop(); diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 9a6e7903a..f515c4891 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -267,7 +267,7 @@ PeerData *HistoryItem::displayFrom() const { void HistoryItem::invalidateChatListEntry() { if (const auto main = App::main()) { // #TODO feeds search results - main->repaintDialogRow({ history(), fullId() }); + main->refreshDialogRow({ history(), fullId() }); } // invalidate cache for drawInDialog diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 942cc0e23..4255eed31 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2190,6 +2190,10 @@ void MainWidget::repaintDialogRow(Dialogs::RowDescriptor row) { _dialogs->repaintDialogRow(row); } +void MainWidget::refreshDialogRow(Dialogs::RowDescriptor row) { + _dialogs->refreshDialogRow(row); +} + void MainWidget::windowShown() { _history->windowShown(); } diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index a28e6d5da..6afd699dd 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -137,6 +137,7 @@ public: void removeDialog(Dialogs::Key key); void repaintDialogRow(FilterId filterId, not_null row); void repaintDialogRow(Dialogs::RowDescriptor row); + void refreshDialogRow(Dialogs::RowDescriptor row); void windowShown();