2
This file is part of PulseAudio.
4
Copyright 2009 Lennart Poettering
5
Copyright 2011 Colin Guthrie
7
PulseAudio is free software; you can redistribute it and/or modify
8
it under the terms of the GNU Lesser General Public License as published
9
by the Free Software Foundation; either version 2.1 of the License,
10
or (at your option) any later version.
12
PulseAudio is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
25
#include <pulse/xmalloc.h>
27
#include <pulsecore/module.h>
28
#include <pulsecore/log.h>
30
#include "module-combine-symdef.h"
32
PA_MODULE_AUTHOR("Colin Guthrie");
33
PA_MODULE_DESCRIPTION("Compatibility module (module-combine rename)");
34
PA_MODULE_VERSION(PACKAGE_VERSION);
35
PA_MODULE_LOAD_ONCE(false);
36
PA_MODULE_DEPRECATED("Please use module-combine-sink instead of module-combine!");
39
uint32_t module_index;
42
int pa__init(pa_module*m) {
47
pa_assert_se(m->userdata = u = pa_xnew0(struct userdata, 1));
49
pa_log_warn("We will now load module-combine-sink. Please make sure to remove module-combine from your configuration.");
51
module = pa_module_load(m->core, "module-combine-sink", m->argument);
52
u->module_index = module ? module->index : PA_INVALID_INDEX;
54
return module ? 0 : -1;
57
void pa__done(pa_module*m) {
61
pa_assert(m->userdata);
65
if (u && PA_INVALID_INDEX != u->module_index)
66
pa_module_unload_by_index(m->core, u->module_index, true);