[pulseaudio-discuss] [PATCH] pulse: Move PA_CLAMP* to pulse/
tanu.kaskinen at linux.intel.com
Wed Mar 11 05:03:48 PDT 2015
On Wed, 2015-03-11 at 17:28 +0530, Arun Raghavan wrote:
> 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.
I think volume.h is a better place, because otherwise macro.h will have
to #include volume.h, which I think is a bit ugly. But I don't care too
much either way.
More information about the pulseaudio-discuss