From 2720585731eb6a39fece86fb675a644b8ea803ae Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Tue, 2 Dec 2008 02:22:43 +0100 Subject: replaced mpd_likely/mpd_unlikely by G_LIKELY/G_UNLIKELY We want to remove gcc.h eventually. This takes care of all the G_LIKELY/G_UNLIKELY macros. --- src/pcm_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pcm_utils.c') diff --git a/src/pcm_utils.c b/src/pcm_utils.c index bc9516a8f..4759c20ac 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -26,6 +26,7 @@ #include #include #include +#include static inline int pcm_dither(void) @@ -40,9 +41,9 @@ pcm_dither(void) static int32_t pcm_range(int32_t sample, unsigned bits) { - if (mpd_unlikely(sample < (-1 << (bits - 1)))) + if (G_UNLIKELY(sample < (-1 << (bits - 1)))) return -1 << (bits - 1); - if (mpd_unlikely(sample >= (1 << (bits - 1)))) + if (G_UNLIKELY(sample >= (1 << (bits - 1)))) return (1 << (bits - 1)) - 1; return sample; } -- cgit v1.2.3