aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm_utils.c')
-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;
}