commit 5e4109bfbfa188942a0469d4ea361a71682daf33
parent 0a4caffe763e6a754d4ea192c61efc6238fecc08
Author: Louis Burda <quent.burda@gmail.com>
Date: Wed, 21 Dec 2022 01:43:42 +0100
Signal missing volume support with -1 value
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mplay.c b/src/mplay.c
@@ -308,6 +308,9 @@ user_vol(void)
pa_volume_t vol;
update_sink_input_info();
+ if (!pa_strm_sink.has_volume)
+ return -1;
+
vol = pa_cvolume_avg(&pa_strm_sink.volume);
return vol * 100.F / PA_VOLUME_NORM;