summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-backend.c
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-07-05 01:35:00 +0200
committerMichal Ratajsky <[email protected]>2014-07-05 01:35:00 +0200
commit85070f3b97a3213d75a7bebf86ad973aaa21c55b (patch)
treefa3a29c788acd6233ca7a201ee9aaebffafa7d4c /backends/pulse/pulse-backend.c
parent4793cbd87fed50678215b5dc1ba8e708fd4c9b58 (diff)
downloadlibmatemixer-85070f3b97a3213d75a7bebf86ad973aaa21c55b.tar.bz2
libmatemixer-85070f3b97a3213d75a7bebf86ad973aaa21c55b.tar.xz
Add ability to set monitor name and fix a few problems
Diffstat (limited to 'backends/pulse/pulse-backend.c')
-rw-r--r--backends/pulse/pulse-backend.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/backends/pulse/pulse-backend.c b/backends/pulse/pulse-backend.c
index 1794018..da73396 100644
--- a/backends/pulse/pulse-backend.c
+++ b/backends/pulse/pulse-backend.c
@@ -529,8 +529,12 @@ backend_set_default_input_stream (MateMixerBackend *backend, MateMixerStream *st
return FALSE;
}
- return pulse_connection_set_default_source (pulse->priv->connection,
- mate_mixer_stream_get_name (stream));
+ if (!pulse_connection_set_default_source (pulse->priv->connection,
+ mate_mixer_stream_get_name (stream)))
+ return FALSE;
+
+ g_object_notify (G_OBJECT (pulse), "default-input");
+ return TRUE;
}
static MateMixerStream *
@@ -556,8 +560,12 @@ backend_set_default_output_stream (MateMixerBackend *backend, MateMixerStream *s
return FALSE;
}
- return pulse_connection_set_default_sink (pulse->priv->connection,
- mate_mixer_stream_get_name (stream));
+ if (!pulse_connection_set_default_sink (pulse->priv->connection,
+ mate_mixer_stream_get_name (stream)))
+ return FALSE;
+
+ g_object_notify (G_OBJECT (pulse), "default-output");
+ return TRUE;
}
static void
@@ -626,6 +634,9 @@ backend_server_info_cb (PulseConnection *connection,
if (pulse->priv->default_source != NULL)
name_source = mate_mixer_stream_get_name (pulse->priv->default_source);
+ // XXX
+ // default input might be monitor !!!
+
if (g_strcmp0 (name_source, info->default_source_name)) {
if (pulse->priv->default_source != NULL)
g_clear_object (&pulse->priv->default_source);