X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/a861ffacc490c690da8f05077be1efb7d4e2895c..77b3ba514cbb00adb89bafa7f48b4430d9764355:/src/modules/module-sine.c diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c index 2ea78da2..c6d73039 100644 --- a/src/modules/module-sine.c +++ b/src/modules/module-sine.c @@ -5,7 +5,7 @@ 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 of the License, + 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 @@ -24,7 +24,6 @@ #endif #include -#include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include "module-sine-symdef.h" @@ -131,7 +129,7 @@ int pa__init(pa_module*m) { goto fail; } - if (!(sink = pa_namereg_get(m->core, pa_modargs_get_value(ma, "sink", NULL), PA_NAMEREG_SINK, TRUE))) { + if (!(sink = pa_namereg_get(m->core, pa_modargs_get_value(ma, "sink", NULL), PA_NAMEREG_SINK))) { pa_log("No such sink."); goto fail; } @@ -157,13 +155,13 @@ int pa__init(pa_module*m) { pa_sink_input_new_data_init(&data); data.driver = __FILE__; data.module = m; - data.sink = sink; + pa_sink_input_new_data_set_sink(&data, sink, FALSE); pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME, "%u Hz Sine", frequency); pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "abstract"); pa_proplist_setf(data.proplist, "sine.hz", "%u", frequency); pa_sink_input_new_data_set_sample_spec(&data, &ss); - u->sink_input = pa_sink_input_new(m->core, &data, 0); + pa_sink_input_new(&u->sink_input, m->core, &data); pa_sink_input_new_data_done(&data); if (!u->sink_input)