"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/modules/module-device-restore.c" between
pulseaudio-14.0.tar.xz and pulseaudio-14.2.tar.xz

About: PulseAudio is a networked sound server (for POSIX OSes), a proxy for your sound applications.

module-device-restore.c  (pulseaudio-14.0.tar.xz):module-device-restore.c  (pulseaudio-14.2.tar.xz)
skipping to change at line 1198 skipping to change at line 1198
pa_assert(c); pa_assert(c);
pa_assert(u); pa_assert(u);
pa_idxset_remove_by_data(u->subscribed, c, NULL); pa_idxset_remove_by_data(u->subscribed, c, NULL);
return PA_HOOK_OK; return PA_HOOK_OK;
} }
int pa__init(pa_module*m) { int pa__init(pa_module*m) {
pa_modargs *ma = NULL; pa_modargs *ma = NULL;
struct userdata *u; struct userdata *u;
char *fname; char *state_path;
pa_sink *sink; pa_sink *sink;
pa_source *source; pa_source *source;
uint32_t idx; uint32_t idx;
bool restore_volume = true, restore_muted = true, restore_port = true, resto re_formats = true; bool restore_volume = true, restore_muted = true, restore_port = true, resto re_formats = true;
pa_assert(m); pa_assert(m);
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments"); pa_log("Failed to parse module arguments");
goto fail; goto fail;
skipping to change at line 1255 skipping to change at line 1255
pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_FIXATE], PA_ HOOK_EARLY, (pa_hook_cb_t) sink_fixate_hook_callback, u); pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_FIXATE], PA_ HOOK_EARLY, (pa_hook_cb_t) sink_fixate_hook_callback, u);
pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SOURCE_FIXATE], P A_HOOK_EARLY, (pa_hook_cb_t) source_fixate_hook_callback, u); pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SOURCE_FIXATE], P A_HOOK_EARLY, (pa_hook_cb_t) source_fixate_hook_callback, u);
pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_PORT_CHANGED ], PA_HOOK_EARLY, (pa_hook_cb_t) sink_port_hook_callback, u); pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_PORT_CHANGED ], PA_HOOK_EARLY, (pa_hook_cb_t) sink_port_hook_callback, u);
pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANG ED], PA_HOOK_EARLY, (pa_hook_cb_t) source_port_hook_callback, u); pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANG ED], PA_HOOK_EARLY, (pa_hook_cb_t) source_port_hook_callback, u);
} }
if (restore_formats) if (restore_formats)
pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOO K_EARLY, (pa_hook_cb_t) sink_put_hook_callback, u); pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOO K_EARLY, (pa_hook_cb_t) sink_put_hook_callback, u);
if (!(fname = pa_state_path("device-volumes", true))) if (!(state_path = pa_state_path(NULL, true)))
goto fail; goto fail;
if (!(u->database = pa_database_open(fname, true))) { if (!(u->database = pa_database_open(state_path, "device-volumes", true, tru
pa_log("Failed to open volume database '%s': %s", fname, pa_cstrerror(er e))) {
rno)); pa_xfree(state_path);
pa_xfree(fname);
goto fail; goto fail;
} }
pa_log_info("Successfully opened database file '%s'.", fname); pa_xfree(state_path);
pa_xfree(fname);
PA_IDXSET_FOREACH(sink, m->core->sinks, idx) PA_IDXSET_FOREACH(sink, m->core->sinks, idx)
subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_E VENT_NEW, sink->index, u); subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_E VENT_NEW, sink->index, u);
PA_IDXSET_FOREACH(source, m->core->sources, idx) PA_IDXSET_FOREACH(source, m->core->sources, idx)
subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION _EVENT_NEW, source->index, u); subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION _EVENT_NEW, source->index, u);
pa_modargs_free(ma); pa_modargs_free(ma);
return 0; return 0;
 End of changes. 4 change blocks. 
8 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)