[pulseaudio-discuss] [PATCH] pulse: Move PA_CLAMP* to pulse/
Arun Raghavan
arun at accosted.net
Wed Mar 11 04:58:45 PDT 2015
On 11 March 2015 at 17:18, Tanu Kaskinen <tanu.kaskinen at linux.intel.com> wrote:
> 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
Hmm, good point. I'd actually be okay with just moving the macro to
pulsecore/macro.h. If that sounds okay, I can just do that.
-- Arun
More information about the pulseaudio-discuss
mailing list