diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index d553b6700c..fc0dd0d008 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -34,8 +35,8 @@ #include "ao.h" #include "internal.h" -#define VOL_PA2MP(v) ((v) * 100 / PA_VOLUME_NORM) -#define VOL_MP2PA(v) ((v) * PA_VOLUME_NORM / 100) +#define VOL_PA2MP(v) ((v) * 100.0 / PA_VOLUME_NORM) +#define VOL_MP2PA(v) lrint((v) * PA_VOLUME_NORM / 100) struct priv { // PulseAudio playback stream object