summaryrefslogtreecommitdiffstats
path: root/apps/pcmbuf.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-12-04 18:19:39 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-12-04 18:19:39 +0000
commita43df152c2adf737208bbeb294a0a13608d3cc43 (patch)
treec0534198745141699a08d9471303744948e51138 /apps/pcmbuf.c
parent700e360b612766eb2729597be55c43b5b69bbe7f (diff)
downloadrockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.tar.gz
rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.tar.bz2
rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.zip
Collect the 16-bit signed range sample clipping routines scattered about, which can be optimized on armv6 and create firmware/export/dsp-util.h (for lack of better place right now).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31142 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r--apps/pcmbuf.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 8135a30a36..32e1157132 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -27,6 +27,7 @@
#include "pcm.h"
#include "pcm_mixer.h"
#include "pcmbuf.h"
+#include "dsp-util.h"
#include "playback.h"
#include "codec_thread.h"
@@ -828,14 +829,6 @@ static size_t crossfade_find_buftail(size_t buffer_rem, size_t buffer_need)
return buffer_rem;
}
-/* Clip sample to signed 16 bit range */
-static FORCE_INLINE int32_t clip_sample_16(int32_t sample)
-{
- if ((int16_t)sample != sample)
- sample = 0x7fff ^ (sample >> 31);
- return sample;
-}
-
/* Returns the number of bytes _NOT_ mixed/faded */
static int crossfade_mix_fade(int factor, size_t size, void *buf, size_t *out_index,
unsigned long elapsed, off_t offset)