[pulseaudio-discuss] [PATCH] pulse: Move PA_CLAMP* to pulse/

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Wed Mar 11 04:48:26 PDT 2015


On Wed, 2015-03-11 at 16:38 +0530, arun at accosted.net wrote:
> From: Arun Raghavan <git at arunraghavan.net>
> 
> We use PA_CLAMP_UNLIKELY in volume.h, which clients might use, so we
> need to make sure the macros is available in exported headers.
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89515

The bug complains about PA_CLAMP_VOLUME, but has that macro ever worked
in applications? If not, we could remove PA_CLAMP_VOLUME from the public
API without breaking compatibility. The required patch would be much
simpler:

-/** Clamp volume to the permitted range. \since 1.0 */
+#ifdef __INCLUDED_FROM_PULSE_AUDIO
 #define PA_CLAMP_VOLUME(v) (PA_CLAMP_UNLIKELY((v), PA_VOLUME_MUTED, PA_VOLUME_MAX))
+#endif

-- 
Tanu



More information about the pulseaudio-discuss mailing list