mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
* add new module for LIRC volume control
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@333 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
1e78a1dd02
commit
fb4cba436c
5 changed files with 248 additions and 7 deletions
|
|
@ -179,12 +179,10 @@ static void callback(struct pa_core *c, enum pa_subscription_event_type t, uint3
|
|||
|
||||
int pa__init(struct pa_core *c, struct pa_module*m) {
|
||||
struct pa_modargs *ma = NULL;
|
||||
const char *table_file;
|
||||
struct userdata *u;
|
||||
assert(c && m);
|
||||
|
||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs)) ||
|
||||
!(table_file = pa_modargs_get_value(ma, "table", NULL))) {
|
||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
||||
pa_log(__FILE__": Failed to parse module arguments\n");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -194,7 +192,7 @@ int pa__init(struct pa_core *c, struct pa_module*m) {
|
|||
u->subscription = NULL;
|
||||
m->userdata = u;
|
||||
|
||||
if (load_rules(u, table_file) < 0)
|
||||
if (load_rules(u, pa_modargs_get_value(ma, "table", NULL)) < 0)
|
||||
goto fail;
|
||||
|
||||
u->subscription = pa_subscription_new(c, PA_SUBSCRIPTION_MASK_SINK_INPUT, callback, u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue