aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer_control.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mixer_control.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mixer_control.c b/src/mixer_control.c
index a43230d5a..f583696e8 100644
--- a/src/mixer_control.c
+++ b/src/mixer_control.c
@@ -33,6 +33,9 @@ mixer_control_setvol(unsigned int device, int volume, int rel)
assert(device < audio_output_count());
output = audio_output_get(device);
+ if (!output->enabled)
+ return false;
+
mixer = ao_plugin_get_mixer(output->plugin, output->data);
if (mixer != NULL) {
if (rel) {
@@ -61,6 +64,9 @@ mixer_control_getvol(unsigned int device, int *volume)
assert(device < audio_output_count());
output = audio_output_get(device);
+ if (!output->enabled)
+ return false;
+
mixer = ao_plugin_get_mixer(output->plugin, output->data);
if (mixer != NULL) {
int volume2;