From a43df152c2adf737208bbeb294a0a13608d3cc43 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 4 Dec 2011 18:19:39 +0000 Subject: 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 --- apps/dsp.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'apps/dsp.c') diff --git a/apps/dsp.c b/apps/dsp.c index d9c097af66..00de511dd0 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -19,15 +19,12 @@ * ****************************************************************************/ #include "config.h" - -#include -#include -#include +#include "system.h" #include #include "dsp.h" +#include "dsp-util.h" #include "eq.h" #include "kernel.h" -#include "system.h" #include "settings.h" #include "replaygain.h" #include "tdspeed.h" @@ -261,14 +258,6 @@ static int32_t release_gain IBSS_ATTR; /* S7.24 format */ static void compressor_process(int count, int32_t *buf[]); -/* Clip sample to signed 16 bit range */ -static inline int32_t clip_sample_16(int32_t sample) -{ - if ((int16_t)sample != sample) - sample = 0x7fff ^ (sample >> 31); - return sample; -} - #ifdef HAVE_PITCHSCREEN int32_t sound_get_pitch(void) { -- cgit v1.2.3