1 /*** 2 This file is part of PulseAudio. 3 4 Copyright 2009 Lennart Poettering 5 6 PulseAudio is free software; you can redistribute it and/or modify 7 it under the terms of the GNU Lesser General Public License as published 8 by the Free Software Foundation; either version 2.1 of the License, 9 or (at your option) any later version. 10 11 PulseAudio is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public License 17 along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 18 ***/ 19 20 #ifdef HAVE_CONFIG_H 21 #include <config.h> 22 #endif 23 24 #include <pulsecore/macro.h> 25 #include <pulsecore/core.h> 26 #include "stream-interaction.h" 27 28 PA_MODULE_AUTHOR("Lennart Poettering"); 29 PA_MODULE_DESCRIPTION("Mute & cork streams with certain roles while others exist"); 30 PA_MODULE_VERSION(PACKAGE_VERSION); 31 PA_MODULE_LOAD_ONCE(true); 32 PA_MODULE_USAGE( 33 "trigger_roles=<Comma separated list of roles which will trigger a cork> " 34 "cork_roles=<Comma separated list of roles which will be corked> " 35 "global=<Should we operate globally or only inside the same device?>" 36 "use_source_trigger=<Do we trigger a cork by a role of source-output as well as sink-input's? Default: false>" 37 ); 38 39 static const char* const valid_modargs[] = { 40 "trigger_roles", 41 "cork_roles", 42 "global", 43 "use_source_trigger", 44 NULL 45 }; 46 pa__init(pa_module * m)47int pa__init(pa_module *m) { 48 49 pa_assert(m); 50 51 return pa_stream_interaction_init(m, valid_modargs); 52 } 53 pa__done(pa_module * m)54void pa__done(pa_module *m) { 55 56 pa_assert(m); 57 58 pa_stream_interaction_done(m); 59 } 60