diff --git a/Build/Makefile b/Build/Makefile index 83baecf721..7b210ca33d 100644 --- a/Build/Makefile +++ b/Build/Makefile @@ -35,7 +35,7 @@ android-build: CMAKE_EXTRA+="-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK_HOME)/build/cmake/android.toolchain.cmake \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DANDROID_ABI=$(ANDROID_ABI) \ - -DANDROID_PLATFORM=android-21 \ + -DANDROID_PLATFORM=android-23 \ -DBUILD_TEAMTALK_LIBRARY_LIB=ON \ -DBUILD_TEAMTALK_LIBRARY_LIBPRO=ON \ -DBUILD_TEAMTALK_CLIENTS=OFF \ diff --git a/ChangeLog.txt b/ChangeLog.txt index 516fadac77..3e5bf6bc31 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -24,6 +24,7 @@ Default Qt Client - Fixed bug where all servers with same name was deleted on server deletion - Updated Qt to 6.11 on Windows and macOS Android Client +- Minimum supported Android version is now 6.0 (Marshmallow) - Easy log on to server using Join Code - Fixed bug where TeamTalk would crash when entering TTS settings - Fixed bug where the initial volume of media files did not match the settings screen diff --git a/Client/TeamTalkAndroid/build.gradle b/Client/TeamTalkAndroid/build.gradle index 40d5c4f29f..18915f6cae 100644 --- a/Client/TeamTalkAndroid/build.gradle +++ b/Client/TeamTalkAndroid/build.gradle @@ -13,7 +13,7 @@ android { defaultConfig { applicationId = 'dk.bearware.gui' - minSdk = 21 + minSdk = 23 targetSdk = 36 versionCode = 150 versionName = '5.22' diff --git a/Library/TeamTalkLib/avstream/MediaPlayback.cpp b/Library/TeamTalkLib/avstream/MediaPlayback.cpp index 09b7f78696..1ffab4807a 100644 --- a/Library/TeamTalkLib/avstream/MediaPlayback.cpp +++ b/Library/TeamTalkLib/avstream/MediaPlayback.cpp @@ -27,6 +27,8 @@ #if defined(ENABLE_WEBRTC) #include "avstream/WebRTCPreprocess.h" +#include +#include #endif #include @@ -208,7 +210,7 @@ bool MediaPlayback::SetupSpeexPreprocess(bool enableagc, const SpeexAGC& agc, bool MediaPlayback::SetupWebRTCPreprocess(const webrtc::AudioProcessing::Config& webrtc) { if (!m_apm) - m_apm = webrtc::AudioProcessingBuilder().Create(); + m_apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); m_apm->ApplyConfig(webrtc); if (m_apm->Initialize() != webrtc::AudioProcessing::kNoError) diff --git a/Library/TeamTalkLib/avstream/MediaPlayback.h b/Library/TeamTalkLib/avstream/MediaPlayback.h index f1e724013f..604922a6ca 100644 --- a/Library/TeamTalkLib/avstream/MediaPlayback.h +++ b/Library/TeamTalkLib/avstream/MediaPlayback.h @@ -142,7 +142,7 @@ class MediaPlayback : public soundsystem::StreamPlayer std::shared_ptr m_preprocess_left, m_preprocess_right; #endif #if defined(ENABLE_WEBRTC) - rtc::scoped_refptr m_apm; + webrtc::scoped_refptr m_apm; #endif bool m_last_callback = false; ACE_Future m_drained; diff --git a/Library/TeamTalkLib/avstream/SoundLoopback.cpp b/Library/TeamTalkLib/avstream/SoundLoopback.cpp index 753ff34c9d..d2454c7ffb 100644 --- a/Library/TeamTalkLib/avstream/SoundLoopback.cpp +++ b/Library/TeamTalkLib/avstream/SoundLoopback.cpp @@ -27,6 +27,8 @@ #if defined(ENABLE_WEBRTC) #include "avstream/WebRTCPreprocess.h" +#include +#include #endif #include @@ -127,7 +129,7 @@ bool SoundLoopback::StartTest(int inputdevid, int outputdevid, #if defined(ENABLE_WEBRTC) if (IsEnabled(apm_cfg)) { - m_apm = webrtc::AudioProcessingBuilder().Create(); + m_apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); if (!m_apm) { StopTest(); @@ -222,7 +224,7 @@ bool SoundLoopback::StartDuplexTest(int inputdevid, int outputdevid, #if defined(ENABLE_WEBRTC) if (IsEnabled(apm_cfg)) { - m_apm = webrtc::AudioProcessingBuilder().Create(); + m_apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); if (!m_apm) { StopTest(); diff --git a/Library/TeamTalkLib/avstream/SoundLoopback.h b/Library/TeamTalkLib/avstream/SoundLoopback.h index 8e6597ffd8..033fd46a8b 100644 --- a/Library/TeamTalkLib/avstream/SoundLoopback.h +++ b/Library/TeamTalkLib/avstream/SoundLoopback.h @@ -108,7 +108,7 @@ class SoundLoopback SpeexPreprocess m_preprocess_left, m_preprocess_right; #endif #if defined(ENABLE_WEBRTC) - rtc::scoped_refptr m_apm; + webrtc::scoped_refptr m_apm; std::vector m_prev_buffer; #endif std::vector m_preprocess_buffer_left, m_preprocess_buffer_right; diff --git a/Library/TeamTalkLib/avstream/WebRTCPreprocess.cpp b/Library/TeamTalkLib/avstream/WebRTCPreprocess.cpp index 95d518a430..fb28f2b028 100644 --- a/Library/TeamTalkLib/avstream/WebRTCPreprocess.cpp +++ b/Library/TeamTalkLib/avstream/WebRTCPreprocess.cpp @@ -26,7 +26,6 @@ #include "codec/MediaUtil.h" #include "myace/MyACE.h" -#include #include #include #include @@ -38,24 +37,6 @@ constexpr auto DEBUG_WEBRTC = 0; -// webrtc::GainControlImpl queries this feature. Field trials is -// excluded by passing rtc_exclude_field_trial_default=true to GN. -namespace webrtc::field_trial { -std::string FindFullName(absl::string_view trial_) -{ - std::string const trial(trial_);; -#if defined(UNICODE) - ACE_TString str = LocalToUnicode(trial.c_str()); -#else - ACE_TString const str = trial.c_str(); -#endif - MYTRACE(ACE_TEXT("Querying feature: %s\n"), str.c_str()); - return "Disabled"; - //return "Enabled"; -} -} // namespace field_trial - // namespace webrtc - bool IsEnabled(const webrtc::AudioProcessing::Config& cfg) { return cfg.gain_controller1.enabled || @@ -136,7 +117,10 @@ int WebRTCPreprocess(webrtc::AudioProcessing& apm, const media::AudioFrame& infr if (stats != nullptr) { auto wstats = apm.GetStatistics(); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" voice_detected |= wstats.voice_detected.value_or(false); +#pragma clang diagnostic pop } in_index += in_cfg.num_frames(); @@ -146,7 +130,10 @@ int WebRTCPreprocess(webrtc::AudioProcessing& apm, const media::AudioFrame& infr if ((stats != nullptr) && n > 0) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" stats->voice_detected = voice_detected; +#pragma clang diagnostic pop } return infrm.input_samples; diff --git a/Library/TeamTalkLib/build/webrtc/0001-Add-support-for-Visual-Studio-2026.patch b/Library/TeamTalkLib/build/webrtc/0001-Add-support-for-Visual-Studio-2026.patch deleted file mode 100644 index 9ff995efde..0000000000 --- a/Library/TeamTalkLib/build/webrtc/0001-Add-support-for-Visual-Studio-2026.patch +++ /dev/null @@ -1,83 +0,0 @@ -From b451a63117d8bdf6a1c57518b1e45798e7bd0963 Mon Sep 17 00:00:00 2001 -From: hwangsihu <129564966+hwangsihu@users.noreply.github.com> -Date: Thu, 4 Dec 2025 20:02:11 +0900 -Subject: [PATCH] Add support for Visual Studio 2026 - ---- - build/vs_toolchain.py | 22 +++++++++++++++------- - 1 file changed, 15 insertions(+), 7 deletions(-) - -diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py -index f3a6fc7de..ecb7102b6 100755 ---- a/build/vs_toolchain.py -+++ b/build/vs_toolchain.py -@@ -49,7 +49,8 @@ json_data_file = os.path.join(script_dir, 'win_toolchain.json') - # The first version is assumed by this script to be the one that is packaged, - # which makes a difference for the arm64 runtime. - MSVS_VERSIONS = collections.OrderedDict([ -- ('2022', '17.0'), # Default and packaged version of Visual Studio. -+ ('2026', '18.0'), # Default and packaged version of Visual Studio. -+ ('2022', '17.0'), - ('2019', '16.0'), - ('2017', '15.0'), - ]) -@@ -57,11 +58,16 @@ MSVS_VERSIONS = collections.OrderedDict([ - # List of preferred VC toolset version based on MSVS - # Order is not relevant for this dictionary. - MSVC_TOOLSET_VERSION = { -+ '2026': 'VC145', - '2022': 'VC143', - '2019': 'VC142', - '2017': 'VC141', - } - -+MSVS_YEAR_TO_PATH = { -+ '2026': '18', -+} -+ - def _HostIsWindows(): - """Returns True if running on a Windows host (including under cygwin).""" - return sys.platform in ('win32', 'cygwin') -@@ -189,8 +195,9 @@ def GetVisualStudioVersion(): - program_files_path_variable = '%ProgramFiles%' - else: - program_files_path_variable = '%ProgramFiles(x86)%' -+ path_version = MSVS_YEAR_TO_PATH.get(version, version) - path = os.path.expandvars(program_files_path_variable + -- '/Microsoft Visual Studio/%s' % version) -+ '/Microsoft Visual Studio/%s' % path_version) - if path and any( - os.path.exists(os.path.join(path, edition)) - for edition in ('Enterprise', 'Professional', 'Community', 'Preview', -@@ -220,22 +227,23 @@ def DetectVisualStudioPath(): - program_files_path_variable = '%ProgramFiles%' - else: - program_files_path_variable = '%ProgramFiles(x86)%' -+ path_version = MSVS_YEAR_TO_PATH.get(version_as_year, version_as_year) - for path in (os.environ.get('vs%s_install' % version_as_year), - os.path.expandvars(program_files_path_variable + - '/Microsoft Visual Studio/%s/Enterprise' % -- version_as_year), -+ path_version), - os.path.expandvars(program_files_path_variable + - '/Microsoft Visual Studio/%s/Professional' % -- version_as_year), -+ path_version), - os.path.expandvars(program_files_path_variable + - '/Microsoft Visual Studio/%s/Community' % -- version_as_year), -+ path_version), - os.path.expandvars(program_files_path_variable + - '/Microsoft Visual Studio/%s/Preview' % -- version_as_year), -+ path_version), - os.path.expandvars(program_files_path_variable + - '/Microsoft Visual Studio/%s/BuildTools' % -- version_as_year)): -+ path_version)): - if path and os.path.exists(path): - return path - --- -2.51.2.windows.1 - diff --git a/Library/TeamTalkLib/build/webrtc/0001-Add-teamtalk-static-lib.patch b/Library/TeamTalkLib/build/webrtc/0001-Add-teamtalk-static-lib.patch new file mode 100644 index 0000000000..033368706f --- /dev/null +++ b/Library/TeamTalkLib/build/webrtc/0001-Add-teamtalk-static-lib.patch @@ -0,0 +1,32 @@ +From 5fe3c2ad5ed6e8942774ca2aaddadc4cbac7591a Mon Sep 17 00:00:00 2001 +From: Sihu Hwang <129564966+hwangsihu@users.noreply.github.com> +Date: Fri, 20 Feb 2026 11:11:48 +0900 +Subject: [PATCH] Add teamtalk static lib + +--- + modules/audio_processing/BUILD.gn | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn +index 2997c457a3..24b08ec06b 100644 +--- a/modules/audio_processing/BUILD.gn ++++ b/modules/audio_processing/BUILD.gn +@@ -228,6 +228,15 @@ rtc_library("audio_processing") { + } + } + ++static_library("teamtalk") { ++ complete_static_lib = true ++ deps = [ ++ ":audio_processing", ++ "../../api/audio:builtin_audio_processing_builder", ++ "../../api/environment:environment_factory", ++ ] ++} ++ + rtc_library("residual_echo_detector") { + poisonous = [ "default_echo_detector" ] + configs += [ ":apm_debug_dump" ] +-- +2.53.0.windows.1 + diff --git a/Library/TeamTalkLib/build/webrtc/CMakeLists.txt b/Library/TeamTalkLib/build/webrtc/CMakeLists.txt index 230a6a35ac..a4f3d79585 100644 --- a/Library/TeamTalkLib/build/webrtc/CMakeLists.txt +++ b/Library/TeamTalkLib/build/webrtc/CMakeLists.txt @@ -9,7 +9,7 @@ include(ExternalProject) set (TOOLCHAIN_INSTALL_PREFIX_WEBRTC ${TOOLCHAIN_INSTALL_PREFIX}/webrtc) if (MSVC) - # WebRTC for Windows depends on "Windows 11 SDK (10.0.22621.0)". This + # WebRTC for Windows depends on "Windows 11 SDK (10.0.26100.0)". This # can be installed from Visual Studio Installer. # # WebRTC for Windows depends on "C++ Clang Compiler for Windows (18.1.8)". @@ -69,14 +69,12 @@ if (MSVC) file(MAKE_DIRECTORY ${WEBRTC_FETCH_PATH}) set (WEBRTC_DOWNLOAD_CMD ${CMAKE_CURRENT_BINARY_DIR}/depottools-win.bat) set (WEBRTC_PATCH_CMD cd ${WEBRTC_SOURCE_ROOT}) - set (WEBRTC_PATCH_CMD2 CALL git apply ${CMAKE_CURRENT_LIST_DIR}\\libteamtalk-r6818.patch) - set (WEBRTC_PATCH_CMD3 CALL git apply ${CMAKE_CURRENT_LIST_DIR}\\0001-Add-support-for-Visual-Studio-2026.patch) + set (WEBRTC_PATCH_CMD2 CALL git apply ${CMAKE_CURRENT_LIST_DIR}\\0001-Add-teamtalk-static-lib.patch) else() message (WARNING "WebRTC is already downloaded to ${WEBRTC_SOURCE_ROOT}. Skipping new fetch and patching") set (WEBRTC_DOWNLOAD_CMD "") set (WEBRTC_PATCH_CMD "") set (WEBRTC_PATCH_CMD2 "") - set (WEBRTC_PATCH_CMD3 "") endif() configure_file(${CMAKE_CURRENT_LIST_DIR}/webrtc_cfg_win.bat_sample ${CMAKE_CURRENT_BINARY_DIR}/webrtc_cfg_win.bat) @@ -87,7 +85,6 @@ if (MSVC) DOWNLOAD_COMMAND ${WEBRTC_DOWNLOAD_CMD} PATCH_COMMAND ${WEBRTC_PATCH_CMD} COMMAND ${WEBRTC_PATCH_CMD2} - COMMAND ${WEBRTC_PATCH_CMD3} INSTALL_DIR ${WEBRTC_INSTALL_ROOT} CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/webrtc_cfg_win.bat COMMAND cd ${WEBRTC_SOURCE_ROOT} @@ -184,7 +181,7 @@ else() elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set (WEBRTC_FETCH_PATH $ENV{HOME}/webrtc/${CMAKE_SYSTEM_NAME} CACHE FILEPATH "Root folder for WebRTC repository") - configure_file(${CMAKE_CURRENT_LIST_DIR}/args.gn_deb ${WEBRTC_INSTALL_ROOT}/args.gn @ONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/args.gn_linux ${WEBRTC_INSTALL_ROOT}/args.gn @ONLY) else() message(WARNING "Unknown platform for WebRTC") @@ -229,9 +226,9 @@ else() if (NOT EXISTS ${WEBRTC_SOURCE_ROOT}) message (WARNING "WebRTC is not present in ${WEBRTC_SOURCE_ROOT}. Downloading... This takes a loooong time") set (WEBRTC_FETCH_CMD1 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && fetch --nohooks ${WEBRTC_REPO_NAME} && gclient sync --with_branch_heads --with_tags) - set (WEBRTC_FETCH_CMD2 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_SOURCE_ROOT} && git checkout branch-heads/6818) + set (WEBRTC_FETCH_CMD2 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_SOURCE_ROOT} && git checkout branch-heads/7727) set (WEBRTC_FETCH_CMD3 ${DEPOTTOOLS_EXPORT} && cd ${WEBRTC_FETCH_PATH} && gclient sync -D) - set (WEBRTC_PATCH_CMD1 cd ${WEBRTC_SOURCE_ROOT} && git apply ${CMAKE_CURRENT_LIST_DIR}/libteamtalk-r6818.patch) + set (WEBRTC_PATCH_CMD1 cd ${WEBRTC_SOURCE_ROOT} && git apply ${CMAKE_CURRENT_LIST_DIR}/0001-Add-teamtalk-static-lib.patch) else() set (WEBRTC_FETCH_CMD1 true) set (WEBRTC_FETCH_CMD2 true) diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_android b/Library/TeamTalkLib/build/webrtc/args.gn_android index b04a24a709..0977bbd822 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_android +++ b/Library/TeamTalkLib/build/webrtc/args.gn_android @@ -1,6 +1,4 @@ gtest_enable_absl_printers=false -is_clang=false -is_component_build=false is_debug=false libsrtp_build_boringssl=false libsrtp_ssl_root="/dev/null" @@ -12,7 +10,6 @@ rtc_builtin_ssl_root_certificates=false rtc_disable_logging=true rtc_enable_protobuf=false rtc_enable_sctp=false -rtc_exclude_field_trial_default=true rtc_include_opus=false rtc_include_tests=false rtc_libvpx_build_vp9=false diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_ios b/Library/TeamTalkLib/build/webrtc/args.gn_ios index e0b05fe94d..9e280b5aba 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_ios +++ b/Library/TeamTalkLib/build/webrtc/args.gn_ios @@ -3,7 +3,6 @@ enable_dsyms=true gtest_enable_absl_printers=false ios_deployment_target="@CMAKE_OSX_DEPLOYMENT_TARGET@" ios_enable_code_signing=false -is_component_build=false is_debug=false libcxx_is_shared=false libsrtp_build_boringssl = false @@ -16,7 +15,6 @@ rtc_builtin_ssl_root_certificates=false rtc_disable_logging=true rtc_enable_protobuf=false rtc_enable_sctp=false -rtc_exclude_field_trial_default=true rtc_include_opus=false rtc_include_tests=false rtc_libvpx_build_vp9=false diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_deb b/Library/TeamTalkLib/build/webrtc/args.gn_linux similarity index 86% rename from Library/TeamTalkLib/build/webrtc/args.gn_deb rename to Library/TeamTalkLib/build/webrtc/args.gn_linux index 3fdec2ad27..aaf459c7bc 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_deb +++ b/Library/TeamTalkLib/build/webrtc/args.gn_linux @@ -1,6 +1,5 @@ gtest_enable_absl_printers=false is_clang=false -is_component_build=false is_debug=false libsrtp_build_boringssl=false libsrtp_ssl_root="/dev/null" @@ -12,7 +11,6 @@ rtc_builtin_ssl_root_certificates=false rtc_disable_logging=true rtc_enable_protobuf=false rtc_enable_sctp=false -rtc_exclude_field_trial_default=true rtc_include_opus=false rtc_include_tests=false rtc_libvpx_build_vp9=false @@ -21,8 +19,9 @@ rtc_use_x11=false rtc_use_x11_extensions=false treat_warnings_as_errors=false use_aura=false -use_bundled_fontconfig=true use_custom_libcxx=false +use_llvm_libatomic=false use_ozone=false use_rtti=true +use_sysroot=false use_udev=false diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_mac b/Library/TeamTalkLib/build/webrtc/args.gn_mac index 78c7e17f82..390606b612 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_mac +++ b/Library/TeamTalkLib/build/webrtc/args.gn_mac @@ -1,5 +1,4 @@ gtest_enable_absl_printers = false -is_clang = false is_debug = false libsrtp_build_boringssl = false libsrtp_ssl_root = "/dev/null" @@ -12,7 +11,6 @@ rtc_builtin_ssl_root_certificates = false rtc_disable_logging = true rtc_enable_protobuf = false rtc_enable_sctp = false -rtc_exclude_field_trial_default = true rtc_include_opus = false rtc_include_tests = false rtc_libvpx_build_vp9 = false diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_win_debug b/Library/TeamTalkLib/build/webrtc/args.gn_win_debug index 0f0019d694..90cbbcb1c2 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_win_debug +++ b/Library/TeamTalkLib/build/webrtc/args.gn_win_debug @@ -1,5 +1,4 @@ enable_iterator_debugging=true -is_clang=true is_debug=true libsrtp_build_boringssl=false libsrtp_ssl_root="" @@ -11,7 +10,6 @@ rtc_builtin_ssl_root_certificates=false rtc_disable_logging=true rtc_enable_protobuf=false rtc_enable_sctp=false -rtc_exclude_field_trial_default=true rtc_include_opus=false rtc_include_tests=false rtc_libvpx_build_vp9=false diff --git a/Library/TeamTalkLib/build/webrtc/args.gn_win_release b/Library/TeamTalkLib/build/webrtc/args.gn_win_release index 699bd0fde5..be076854d3 100644 --- a/Library/TeamTalkLib/build/webrtc/args.gn_win_release +++ b/Library/TeamTalkLib/build/webrtc/args.gn_win_release @@ -1,4 +1,3 @@ -is_clang=true is_debug=false libsrtp_build_boringssl=false libsrtp_ssl_root="" @@ -10,7 +9,6 @@ rtc_builtin_ssl_root_certificates=false rtc_disable_logging=true rtc_enable_protobuf=false rtc_enable_sctp=false -rtc_exclude_field_trial_default=true rtc_include_opus=false rtc_include_tests=false rtc_libvpx_build_vp9=false diff --git a/Library/TeamTalkLib/build/webrtc/depottools-win.bat_sample b/Library/TeamTalkLib/build/webrtc/depottools-win.bat_sample index cd9e7d34ba..41793ec23d 100644 --- a/Library/TeamTalkLib/build/webrtc/depottools-win.bat_sample +++ b/Library/TeamTalkLib/build/webrtc/depottools-win.bat_sample @@ -6,7 +6,7 @@ CALL fetch --nohooks webrtc IF NOT "%ERRORLEVEL%" == "0" GOTO fail CD @WEBRTC_SOURCE_ROOT_NATIVE@ IF NOT "%ERRORLEVEL%" == "0" GOTO fail -CALL git checkout branch-heads/6818 +CALL git checkout branch-heads/7727 IF NOT "%ERRORLEVEL%" == "0" GOTO fail CD @WEBRTC_FETCH_PATH_NATIVE@ IF NOT "%ERRORLEVEL%" == "0" GOTO fail diff --git a/Library/TeamTalkLib/build/webrtc/libteamtalk-r6818.patch b/Library/TeamTalkLib/build/webrtc/libteamtalk-r6818.patch deleted file mode 100644 index 8e1372ca3b..0000000000 --- a/Library/TeamTalkLib/build/webrtc/libteamtalk-r6818.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn -index 03a63bb6c0..636d21f7c7 100644 ---- a/modules/audio_processing/BUILD.gn -+++ b/modules/audio_processing/BUILD.gn -@@ -209,6 +209,13 @@ rtc_library("audio_processing") { - } - } - -+static_library("teamtalk") { -+ complete_static_lib = true -+ deps = [ -+ ":audio_processing", -+ ] -+} -+ - rtc_library("residual_echo_detector") { - poisonous = [ "default_echo_detector" ] - configs += [ ":apm_debug_dump" ] diff --git a/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp b/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp index e05f6296a2..706b2e778d 100644 --- a/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp +++ b/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp @@ -30,6 +30,8 @@ #if defined(ENABLE_WEBRTC) #include "avstream/WebRTCPreprocess.h" +#include +#include #endif #include @@ -277,7 +279,7 @@ bool AudioThread::UpdatePreprocessor(const teamtalk::AudioPreprocessor& preproce } if (!m_apm) - m_apm = webrtc::AudioProcessingBuilder().Create(); + m_apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); m_apm->ApplyConfig(preprocess.webrtc); if (m_apm->Initialize() != webrtc::AudioProcessing::kNoError) { diff --git a/Library/TeamTalkLib/teamtalk/client/AudioThread.h b/Library/TeamTalkLib/teamtalk/client/AudioThread.h index 3474f4298e..e2e6608cb4 100644 --- a/Library/TeamTalkLib/teamtalk/client/AudioThread.h +++ b/Library/TeamTalkLib/teamtalk/client/AudioThread.h @@ -116,7 +116,7 @@ class AudioThread : protected ACE_Task std::unique_ptr m_preprocess_left, m_preprocess_right; #endif #if defined(ENABLE_WEBRTC) - rtc::scoped_refptr m_apm; + webrtc::scoped_refptr m_apm; std::unique_ptr m_aps; #endif #if defined(ENABLE_SPEEX) diff --git a/Library/TeamTalkLib/test/CatchWebRTC.cpp b/Library/TeamTalkLib/test/CatchWebRTC.cpp index ab78e07d3f..011e1dde68 100644 --- a/Library/TeamTalkLib/test/CatchWebRTC.cpp +++ b/Library/TeamTalkLib/test/CatchWebRTC.cpp @@ -27,6 +27,8 @@ #include "codec/WaveFile.h" #include +#include +#include #include #include #include @@ -169,7 +171,7 @@ TEST_CASE("webrtc-apm") std::vector in_buff(af.channels * in_cfg.num_frames()); std::vector apm_buff(af.channels * out_cfg.num_frames()); - auto apm = webrtc::AudioProcessingBuilder().Create(); + auto apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); // first try gain_controller1 @@ -228,7 +230,7 @@ TEST_CASE("webrtc-double-gain") std::vector in_buff(af.channels * in_cfg.num_frames()); std::vector apm_buff(af.channels * out_cfg.num_frames()); - auto apm = webrtc::AudioProcessingBuilder().Create(); + auto apm = webrtc::BuiltinAudioProcessingBuilder().Build(webrtc::CreateEnvironment()); webrtc::AudioProcessing::Config apm_cfg; rawfile.Close();