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.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index b1178c7a2..43690ef89 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -41,20 +41,6 @@ pcm_dither(void)
return (r & 511) - ((r >> 9) & 511);
}
-/**
- * Check if the value is within the range of the provided bit size,
- * and caps it if necessary.
- */
-static int32_t
-pcm_range(int32_t sample, unsigned bits)
-{
- if (G_UNLIKELY(sample < (-1 << (bits - 1))))
- return -1 << (bits - 1);
- if (G_UNLIKELY(sample >= (1 << (bits - 1))))
- return (1 << (bits - 1)) - 1;
- return sample;
-}
-
static void
pcm_volume_change_8(int8_t *buffer, unsigned num_samples, int volume)
{