summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-08-20 22:55:54 +0200
committerMichal Ratajsky <[email protected]>2014-08-20 22:55:54 +0200
commit4a2da6bcb81e407dbaa40d053cdda2e03a696c68 (patch)
tree4d26fd4680f951955d87a5fb3b674db2cba8a3b5
parent757af51e610632bfbe507f3b644014467b417d61 (diff)
downloadlibmatemixer-4a2da6bcb81e407dbaa40d053cdda2e03a696c68.tar.bz2
libmatemixer-4a2da6bcb81e407dbaa40d053cdda2e03a696c68.tar.xz
Remember the value and notify after changing balance or fade
-rw-r--r--libmatemixer/matemixer-stream-control.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libmatemixer/matemixer-stream-control.c b/libmatemixer/matemixer-stream-control.c
index d2c756c..ef0f906 100644
--- a/libmatemixer/matemixer-stream-control.c
+++ b/libmatemixer/matemixer-stream-control.c
@@ -727,8 +727,12 @@ mate_mixer_stream_control_set_balance (MateMixerStreamControl *control, gfloat b
klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control);
- if (G_LIKELY (klass->set_balance != NULL))
- return klass->set_balance (control, balance);
+ if (klass->set_balance == NULL ||
+ klass->set_balance (control, balance) == FALSE)
+ return FALSE;
+
+ _mate_mixer_stream_control_set_balance (control, balance);
+ return TRUE;
}
return FALSE;
}
@@ -766,8 +770,12 @@ mate_mixer_stream_control_set_fade (MateMixerStreamControl *control, gfloat fade
klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control);
- if (klass->set_fade != NULL)
- return klass->set_fade (control, fade);
+ if (klass->set_fade == NULL ||
+ klass->set_fade (control, fade) == FALSE)
+ return FALSE;
+
+ _mate_mixer_stream_control_set_fade (control, balance);
+ return TRUE;
}
return FALSE;
}