aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mixer_control.c8
-rw-r--r--src/mixer_plugin.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mixer_control.c b/src/mixer_control.c
index 7def51cb2..7a8ba48e4 100644
--- a/src/mixer_control.c
+++ b/src/mixer_control.c
@@ -140,9 +140,13 @@ mixer_get_volume(struct mixer *mixer, GError **error_r)
g_mutex_lock(mixer->mutex);
if (mixer->open) {
- volume = mixer->plugin->get_volume(mixer, error_r);
- if (volume < 0)
+ GError *error = NULL;
+
+ volume = mixer->plugin->get_volume(mixer, &error);
+ if (volume < 0 && error != NULL) {
+ g_propagate_error(error_r, error);
mixer_failed(mixer);
+ }
} else
volume = -1;
diff --git a/src/mixer_plugin.h b/src/mixer_plugin.h
index 648c3280c..b6e67e8ff 100644
--- a/src/mixer_plugin.h
+++ b/src/mixer_plugin.h
@@ -72,8 +72,8 @@ struct mixer_plugin {
*
* @param error_r location to store the error occuring, or
* NULL to ignore errors
- * @return the current volume (0..100 including) or -1 on
- * error
+ * @return the current volume (0..100 including) or -1 if
+ * unavailable or on error (error_r set, mixer will be closed)
*/
int (*get_volume)(struct mixer *mixer, GError **error_r);