aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
authorThomas Jansen <mithi@mithi.net>2008-12-02 02:22:43 +0100
committerThomas Jansen <mithi@mithi.net>2008-12-02 02:22:43 +0100
commit2720585731eb6a39fece86fb675a644b8ea803ae (patch)
tree43c66f17c1266e484b6f8fa9951cdd98920a0f2b /src/pcm_utils.c
parent4ca24f22f191033e5dbb88f34e4088bc2814ed0f (diff)
downloadmpd-2720585731eb6a39fece86fb675a644b8ea803ae.tar.gz
mpd-2720585731eb6a39fece86fb675a644b8ea803ae.tar.xz
mpd-2720585731eb6a39fece86fb675a644b8ea803ae.zip
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.
Diffstat (limited to '')
-rw-r--r--src/pcm_utils.c5
1 files changed, 3 insertions, 2 deletions
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 <assert.h>
#include <string.h>
#include <math.h>
+#include <glib.h>
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;
}