Skip to content

Commit 7cff7b5

Browse files
committed
Resampler can now compile outside of Speex in fixed-point too.
git-svn-id: http://svn.xiph.org/trunk/speex@12781 0101bb08-14d6-0310-b084-bc0e0c8e3800
1 parent 1686e7e commit 7cff7b5

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

include/speex/speex_resampler.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,7 @@
7878
#define spx_int32_t int
7979
#define spx_uint16_t unsigned short
8080
#define spx_uint32_t unsigned int
81-
82-
#ifdef FIXED_POINT
83-
#define spx_word16_t spx_int16_t
84-
#define spx_word32_t spx_int32_t
85-
86-
#else /* FIXED_POINT */
87-
88-
#define spx_word16_t float
89-
#define spx_word32_t float
90-
#define MULT16_16(a,b) ((a)*(b))
91-
#define MULT16_32_Q15(a,b) ((a)*(b))
92-
#define PSHR32(a,b) (a)
93-
#endif /* FIXED_POINT */
94-
81+
9582
#else /* OUTSIDE_SPEEX */
9683

9784
#include "speex/speex_types.h"

libspeex/arch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
#ifndef ARCH_H
3636
#define ARCH_H
3737

38+
#ifndef OUTSIDE_SPEEX
3839
#include "speex/speex_types.h"
40+
#endif
3941

4042
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
4143
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */

libspeex/resample.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ void *speex_alloc (int size) {return calloc(size,1);}
6060
void *speex_realloc (void *ptr, int size) {return realloc(ptr, size);}
6161
void speex_free (void *ptr) {free(ptr);}
6262
#include "speex_resampler.h"
63-
#else
63+
#include "arch.h"
64+
#else /* OUTSIDE_SPEEX */
65+
6466
#include "speex/speex_resampler.h"
6567
#include "misc.h"
66-
#endif
68+
#endif /* OUTSIDE_SPEEX */
6769

6870
#include <math.h>
6971

0 commit comments

Comments
 (0)