This decrease PA_VOLUME_MAX to be less than 2^31. We want to do this in order to simplify signed arithmetic when applying software volume scaling (since the volume can now always be safely treated as a signed number). --- src/pulse/volume.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pulse/volume.h b/src/pulse/volume.h index 5c5e7d2..8f959c2 100644 --- a/src/pulse/volume.h +++ b/src/pulse/volume.h @@ -110,7 +110,7 @@ typedef uint32_t pa_volume_t; #define PA_VOLUME_MUTED ((pa_volume_t) 0U) /** Maximum valid volume we can store. \since 0.9.15 */ -#define PA_VOLUME_MAX ((pa_volume_t) UINT32_MAX-1) +#define PA_VOLUME_MAX ((pa_volume_t) UINT32_MAX/2) /** Special 'invalid' volume. \since 0.9.16 */ #define PA_VOLUME_INVALID ((pa_volume_t) UINT32_MAX) -- 1.7.3.1 _______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss