diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-12-04 18:19:39 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-12-04 18:19:39 +0000 |
| commit | a43df152c2adf737208bbeb294a0a13608d3cc43 (patch) | |
| tree | c0534198745141699a08d9471303744948e51138 /apps/dsp.c | |
| parent | 700e360b612766eb2729597be55c43b5b69bbe7f (diff) | |
| download | rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.zip rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.tar.gz rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.tar.bz2 rockbox-a43df152c2adf737208bbeb294a0a13608d3cc43.tar.xz | |
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/dsp.c')
| -rw-r--r-- | apps/dsp.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -19,15 +19,12 @@ * ****************************************************************************/ #include "config.h" - -#include <stdbool.h> -#include <inttypes.h> -#include <string.h> +#include "system.h" #include <sound.h> #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) { |