summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/volume.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index 1b26cc78..8a28b334 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
@@ -707,7 +707,11 @@ pa_cvolume* pa_cvolume_scale_mask(pa_cvolume *v, pa_volume_t max, pa_channel_map
pa_assert(v);
- pa_return_val_if_fail(max != (pa_volume_t) -1, NULL);
+ pa_return_val_if_fail(max != PA_VOLUME_INVALID, NULL);
+
+ if (!cm)
+ return pa_cvolume_scale(v, max);
+
pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, cm), NULL);
t = pa_cvolume_max_mask(v, cm, mask);