summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/alsa/alsa-stream-control.c2
-rw-r--r--libmatemixer/matemixer-stream-control.c22
2 files changed, 15 insertions, 9 deletions
diff --git a/backends/alsa/alsa-stream-control.c b/backends/alsa/alsa-stream-control.c
index 97a0f8b..b5500d1 100644
--- a/backends/alsa/alsa-stream-control.c
+++ b/backends/alsa/alsa-stream-control.c
@@ -291,8 +291,6 @@ alsa_stream_control_set_mute (MateMixerStreamControl *mmsc, gboolean mute)
for (i = 0; i < control->priv->data.channels; i++)
control->priv->data.m[i] = mute;
-
- _mate_mixer_stream_control_set_mute (mmsc, mute);
}
return TRUE;
}
diff --git a/libmatemixer/matemixer-stream-control.c b/libmatemixer/matemixer-stream-control.c
index b2b2dad..80f9559 100644
--- a/libmatemixer/matemixer-stream-control.c
+++ b/libmatemixer/matemixer-stream-control.c
@@ -465,8 +465,11 @@ mate_mixer_stream_control_set_mute (MateMixerStreamControl *control, gboolean mu
klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control);
- if G_LIKELY (klass->set_mute != NULL)
- return klass->set_mute (control, mute);
+ if (klass->set_mute == NULL ||
+ klass->set_mute (control, mute) == FALSE)
+ return FALSE;
+
+ _mate_mixer_stream_control_set_mute (control, mute);
}
return FALSE;
}
@@ -786,7 +789,6 @@ mate_mixer_stream_control_get_monitor_enabled (MateMixerStreamControl *control)
if (klass->get_monitor_enabled != NULL)
return klass->get_monitor_enabled (control);
}
-
return FALSE;
}
@@ -806,10 +808,17 @@ mate_mixer_stream_control_set_monitor_enabled (MateMixerStreamControl *control,
MateMixerStreamControlClass *klass;
klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control);
- if (klass->set_monitor_enabled != NULL)
- return klass->set_monitor_enabled (control, enabled);
- }
+ if (klass->set_monitor_enabled == NULL ||
+ klass->set_monitor_enabled (control, enabled) == FALSE)
+ return FALSE;
+ if (enabled == TRUE)
+ g_debug ("Control %s monitor enabled",
+ control->priv->name);
+ else
+ g_debug ("Control %s monitor disabled",
+ control->priv->name);
+ }
return FALSE;
}
@@ -904,7 +913,6 @@ _mate_mixer_stream_control_set_flags (MateMixerStreamControl *control,
g_object_notify_by_pspec (G_OBJECT (control), properties[PROP_FLAGS]);
}
-/* Protected functions */
void
_mate_mixer_stream_control_set_stream (MateMixerStreamControl *control,
MateMixerStream *stream)