summaryrefslogtreecommitdiff
path: root/media-libs/noise-suppression-for-voice/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/noise-suppression-for-voice/files')
-rw-r--r--media-libs/noise-suppression-for-voice/files/99-input-denoising.conf33
-rw-r--r--media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-execinfo.h.patch51
-rw-r--r--media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-stat64.patch42
-rw-r--r--media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-uses-of-nl_langinfo-for-musl.patch36
-rw-r--r--media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-tests.patch (renamed from media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.03-tests.patch)0
5 files changed, 162 insertions, 0 deletions
diff --git a/media-libs/noise-suppression-for-voice/files/99-input-denoising.conf b/media-libs/noise-suppression-for-voice/files/99-input-denoising.conf
new file mode 100644
index 000000000000..37b770619d82
--- /dev/null
+++ b/media-libs/noise-suppression-for-voice/files/99-input-denoising.conf
@@ -0,0 +1,33 @@
+context.modules = [
+{ name = libpipewire-module-filter-chain
+ args = {
+ node.description = "Noise Canceling source"
+ media.name = "Noise Canceling source"
+ filter.graph = {
+ nodes = [
+ {
+ type = ladspa
+ name = rnnoise
+ plugin = %PATH_TO_LADSPA_PLUGIN%
+ label = noise_suppressor_mono
+ control = {
+ "VAD Threshold (%)" = 50.0
+ "VAD Grace Period (ms)" = 200
+ "Retroactive VAD Grace (ms)" = 0
+ }
+ }
+ ]
+ }
+ capture.props = {
+ node.name = "capture.rnnoise_source"
+ node.passive = true
+ audio.rate = 48000
+ }
+ playback.props = {
+ node.name = "rnnoise_source"
+ media.class = Audio/Source
+ audio.rate = 48000
+ }
+ }
+}
+]
diff --git a/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-execinfo.h.patch b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-execinfo.h.patch
new file mode 100644
index 000000000000..e87fb0ada3f9
--- /dev/null
+++ b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-execinfo.h.patch
@@ -0,0 +1,51 @@
+From 74ff3c3990e725c6f9ae407e5f28673570fa4645 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?=
+ <kacper.slominski72@gmail.com>
+Date: Sun, 11 Aug 2024 22:38:58 +0200
+Subject: [PATCH 1/3] Patch out use of execinfo.h
+
+Not available on musl, and the backtrace functionality is unused
+anyway (only called by the leak detector AFAICS).
+---
+ external/JUCE/modules/juce_core/juce_core.cpp | 4 ----
+ .../JUCE/modules/juce_core/system/juce_SystemStats.cpp | 9 +--------
+ 2 files changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/external/JUCE/modules/juce_core/juce_core.cpp b/external/JUCE/modules/juce_core/juce_core.cpp
+index 067a189..e3e6254 100644
+--- a/external/JUCE/modules/juce_core/juce_core.cpp
++++ b/external/JUCE/modules/juce_core/juce_core.cpp
+@@ -101,10 +101,6 @@
+ #include <sys/time.h>
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+-
+- #if ! (JUCE_ANDROID || JUCE_WASM)
+- #include <execinfo.h>
+- #endif
+ #endif
+
+ #if JUCE_MAC || JUCE_IOS
+diff --git a/external/JUCE/modules/juce_core/system/juce_SystemStats.cpp b/external/JUCE/modules/juce_core/system/juce_SystemStats.cpp
+index 3fe9ac7..840c731 100644
+--- a/external/JUCE/modules/juce_core/system/juce_SystemStats.cpp
++++ b/external/JUCE/modules/juce_core/system/juce_SystemStats.cpp
+@@ -173,14 +173,7 @@ String SystemStats::getStackBacktrace()
+ }
+
+ #else
+- void* stack[128];
+- auto frames = backtrace (stack, numElementsInArray (stack));
+- char** frameStrings = backtrace_symbols (stack, frames);
+-
+- for (int i = 0; i < frames; ++i)
+- result << frameStrings[i] << newLine;
+-
+- ::free (frameStrings);
++ jassertfalse; // patched out <execinfo.h>
+ #endif
+
+ return result;
+--
+2.44.2
+
diff --git a/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-stat64.patch b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-stat64.patch
new file mode 100644
index 000000000000..890c33d6197c
--- /dev/null
+++ b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-use-of-stat64.patch
@@ -0,0 +1,42 @@
+From 6b2901929fa7d618bda890adc7ecc15cb18d5b01 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?=
+ <kacper.slominski72@gmail.com>
+Date: Sun, 11 Aug 2024 23:31:25 +0200
+Subject: [PATCH 2/3] Patch out use of stat64
+
+Not available on musl, and we're better off with using
+-D_FILE_OFFSET_BITS=64 instead anyway.
+---
+ CMakeLists.txt | 2 ++
+ external/JUCE/modules/juce_core/native/juce_posix_SharedCode.h | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2c9ade5..ddbaa16 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,8 @@ set(CMAKE_BINARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
+ set(MINGW_ADDITIONAL_LINKING_FLAGS "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic")
+
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
++
+ if(NOT BUILD_VERSION)
+ set(BUILD_VERSION 1.99)
+ endif()
+diff --git a/external/JUCE/modules/juce_core/native/juce_posix_SharedCode.h b/external/JUCE/modules/juce_core/native/juce_posix_SharedCode.h
+index 700e191..b92f19c 100644
+--- a/external/JUCE/modules/juce_core/native/juce_posix_SharedCode.h
++++ b/external/JUCE/modules/juce_core/native/juce_posix_SharedCode.h
+@@ -167,7 +167,7 @@ int juce_siginterrupt (int sig, int flag)
+ //==============================================================================
+ namespace
+ {
+- #if JUCE_LINUX || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
++ #if (JUCE_IOS && ! __DARWIN_ONLY_63_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
+ using juce_statStruct = struct stat64;
+ #define JUCE_STAT stat64
+ #else
+--
+2.44.2
+
diff --git a/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-uses-of-nl_langinfo-for-musl.patch b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-uses-of-nl_langinfo-for-musl.patch
new file mode 100644
index 000000000000..04de9f024b69
--- /dev/null
+++ b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-Patch-out-uses-of-nl_langinfo-for-musl.patch
@@ -0,0 +1,36 @@
+From b0ab5ab1b140fe76ff2e923e9d6434ad434adb88 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?=
+ <kacper.slominski72@gmail.com>
+Date: Sun, 11 Aug 2024 23:46:21 +0200
+Subject: [PATCH 3/3] Patch out uses of nl_langinfo for musl
+
+Not available on musl, instead use the alternative code path for BSD.
+---
+ .../JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/external/JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp b/external/JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp
+index 84abf88..a7b3343 100644
+--- a/external/JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp
++++ b/external/JUCE/modules/juce_core/native/juce_linux_SystemStats.cpp
+@@ -198,7 +198,7 @@ String SystemStats::getComputerName()
+
+ String SystemStats::getUserLanguage()
+ {
+- #if JUCE_BSD
++ #if JUCE_BSD || (JUCE_LINUX && !defined(__GLIBC__))
+ if (auto langEnv = getenv ("LANG"))
+ return String::fromUTF8 (langEnv).upToLastOccurrenceOf (".UTF-8", false, true);
+
+@@ -210,7 +210,7 @@ String SystemStats::getUserLanguage()
+
+ String SystemStats::getUserRegion()
+ {
+- #if JUCE_BSD
++ #if JUCE_BSD || (JUCE_LINUX && !defined(__GLIBC__))
+ return {};
+ #else
+ return getLocaleValue (_NL_IDENTIFICATION_TERRITORY);
+--
+2.44.2
+
diff --git a/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.03-tests.patch b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-tests.patch
index d9f8bd5a0d33..d9f8bd5a0d33 100644
--- a/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.03-tests.patch
+++ b/media-libs/noise-suppression-for-voice/files/noise-suppression-for-voice-1.10-tests.patch