diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-10-07 10:08:18 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-10-07 10:08:18 -0400 |
commit | aeb17c8f7825a68e367c50421f89695d41fcd5fb (patch) | |
tree | a8bbd335136def8b8096d37129fd7ac798b5ddcd /src/pulse-manager.c | |
parent | 7695b78d05fd79ad7581d82b1f5ad171529e19e0 (diff) | |
parent | 7ea2deb67919da59bbeab00e3b4e244c8395ff58 (diff) | |
download | ayatana-indicator-sound-aeb17c8f7825a68e367c50421f89695d41fcd5fb.tar.gz ayatana-indicator-sound-aeb17c8f7825a68e367c50421f89695d41fcd5fb.tar.bz2 ayatana-indicator-sound-aeb17c8f7825a68e367c50421f89695d41fcd5fb.zip |
Import upstream version 0.4.8
Diffstat (limited to 'src/pulse-manager.c')
-rw-r--r-- | src/pulse-manager.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/pulse-manager.c b/src/pulse-manager.c index f93368e..8779525 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -43,7 +43,6 @@ static void pulse_server_info_callback(pa_context *c, const pa_server_info *info static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, void *userdata); static void destroy_sink_info(void *value); static gboolean determine_sink_availability(); -static void reconnect_to_pulse(); static gboolean has_volume_changed(const pa_sink_info* new_sink, sink_info* cached_sink); static pa_cvolume construct_mono_volume(const pa_cvolume* vol); @@ -100,35 +99,6 @@ void close_pulse_activites() } /** -reconnect_to_pulse() -In the event of Pulseaudio flapping in the wind handle gracefully without -memory leaks ! -*/ -static void reconnect_to_pulse() -{ - // reset - if (pulse_context != NULL) { - g_debug("freeing the pulse context"); - pa_context_unref(pulse_context); - pulse_context = NULL; - } - - if (sink_hash != NULL) { - g_hash_table_destroy(sink_hash); - sink_hash = NULL; - } - - // reconnect - pulse_context = pa_context_new(pa_glib_mainloop_get_api(pa_main_loop), "ayatana.indicator.sound"); - g_assert(pulse_context); - sink_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_sink_info); - // Establish event callback registration - pa_context_set_state_callback(pulse_context, context_state_callback, NULL); - dbus_menu_manager_update_pa_state(FALSE, FALSE, FALSE, 0); - pa_context_connect(pulse_context, NULL, PA_CONTEXT_NOFAIL, NULL); -} - -/** destroy_sink_info() item destructor method for the sink_info hash **/ @@ -534,7 +504,6 @@ static void context_state_callback(pa_context *c, void *userdata) case PA_CONTEXT_FAILED: g_warning("FAILED to retrieve context - Is PulseAudio Daemon running ?"); pa_server_available = FALSE; - reconnect_to_pulse(); break; case PA_CONTEXT_TERMINATED: /* g_debug("context terminated");*/ |