diff --git a/src/modules/meson.build b/src/modules/meson.build index 375b04205..038b76596 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -24,6 +24,16 @@ pipewire_module_loopback = shared_library('pipewire-module-loopback', dependencies : [mathlib, dl_lib, pipewire_dep], ) +pipewire_module_ladspa_filter = shared_library('pipewire-module-ladspa-filter', + [ 'module-ladspa-filter.c' ], + c_args : pipewire_module_c_args, + include_directories : [configinc, spa_inc], + install : true, + install_dir : modules_install_dir, + install_rpath: modules_install_dir, + dependencies : [mathlib, dl_lib, pipewire_dep], +) + pipewire_module_echo_cancel = shared_library('pipewire-module-echo-cancel', [ 'module-echo-cancel.c', 'module-echo-cancel/aec-null.c', diff --git a/src/modules/module-ladspa-filter.c b/src/modules/module-ladspa-filter.c new file mode 100644 index 000000000..de2cb779c --- /dev/null +++ b/src/modules/module-ladspa-filter.c @@ -0,0 +1,639 @@ +/* PipeWire + * + * Copyright © 2021 Wim Taymans + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#define NAME "ladspa-filter" + +static const struct spa_dict_item module_props[] = { + { PW_KEY_MODULE_AUTHOR, "Wim Taymans " }, + { PW_KEY_MODULE_DESCRIPTION, "Create ladspa filter streams" }, + { PW_KEY_MODULE_USAGE, " [ remote.name= ] " + "[ node.latency= ] " + "[ node.name= ] " + "[ node.description= ] " + "[ audio.rate= ] " + "[ audio.channels= ] " + "[ audio.position= ] " + "ladspa.plugin= " + "ladspa.label=