From 2dd5bc6a074165ddfbd57c4bd52c2d2dac8f47a1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:03:18 +0200 Subject: Adding upstream version 14.2. Signed-off-by: Daniel Baumann --- src/modules/module-role-cork.c | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/modules/module-role-cork.c (limited to 'src/modules/module-role-cork.c') diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c new file mode 100644 index 0000000..3d3f5db --- /dev/null +++ b/src/modules/module-role-cork.c @@ -0,0 +1,59 @@ +/*** + This file is part of PulseAudio. + + Copyright 2009 Lennart Poettering + + PulseAudio is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, + or (at your option) any later version. + + PulseAudio is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with PulseAudio; if not, see . +***/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include "stream-interaction.h" + +PA_MODULE_AUTHOR("Lennart Poettering"); +PA_MODULE_DESCRIPTION("Mute & cork streams with certain roles while others exist"); +PA_MODULE_VERSION(PACKAGE_VERSION); +PA_MODULE_LOAD_ONCE(true); +PA_MODULE_USAGE( + "trigger_roles= " + "cork_roles= " + "global=" + "use_source_trigger=" + ); + +static const char* const valid_modargs[] = { + "trigger_roles", + "cork_roles", + "global", + "use_source_trigger", + NULL +}; + +int pa__init(pa_module *m) { + + pa_assert(m); + + return pa_stream_interaction_init(m, valid_modargs); +} + +void pa__done(pa_module *m) { + + pa_assert(m); + + pa_stream_interaction_done(m); +} -- cgit v1.2.3