1
////////////////////////////////////////////////////////////////////////////////
3
/// Common type definitions for SoundTouch audio processing library.
5
/// Author : Copyright (c) Olli Parviainen
6
/// Author e-mail : oparviai 'at' iki.fi
7
/// SoundTouch WWW: http://www.surina.net/soundtouch
9
////////////////////////////////////////////////////////////////////////////////
11
// Last changed : $Date: 2006/09/18 07:39:15 $
12
// File revision : $Revision: 1.2 $
14
// $Id: STTypes.h,v 1.2 2006/09/18 07:39:15 richardash1981 Exp $
16
////////////////////////////////////////////////////////////////////////////////
20
// SoundTouch audio processing library
21
// Copyright (c) Olli Parviainen
23
// This library is free software; you can redistribute it and/or
24
// modify it under the terms of the GNU Lesser General Public
25
// License as published by the Free Software Foundation; either
26
// version 2.1 of the License, or (at your option) any later version.
28
// This library is distributed in the hope that it will be useful,
29
// but WITHOUT ANY WARRANTY; without even the implied warranty of
30
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31
// Lesser General Public License for more details.
33
// You should have received a copy of the GNU Lesser General Public
34
// License along with this library; if not, write to the Free Software
35
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37
////////////////////////////////////////////////////////////////////////////////
42
typedef unsigned int uint;
43
typedef unsigned long ulong;
46
// In GCC, include soundtouch_config.h made by config scritps
47
#include "soundtouch_config.h"
51
// if these aren't defined already by Windows headers, define now
63
/// Activate these undef's to overrule the possible sampletype
64
/// setting inherited from some other header file:
65
//#undef INTEGER_SAMPLES
66
//#undef FLOAT_SAMPLES
68
#if !(INTEGER_SAMPLES || FLOAT_SAMPLES)
70
/// Choose either 32bit floating point or 16bit integer sampletype
71
/// by choosing one of the following defines, unless this selection
72
/// has already been done in some other file.
75
/// - In Windows environment, choose the sample format with the
76
/// following defines.
77
/// - In GNU environment, the floating point samples are used by
78
/// default, but integer samples can be chosen by giving the
79
/// following switch to the configure script:
80
/// ./configure --enable-integer-samples
81
/// However, if you still prefer to select the sample format here
82
/// also in GNU environment, then please #undef the INTEGER_SAMPLE
83
/// and FLOAT_SAMPLE defines first as in comments above.
84
//#define INTEGER_SAMPLES 1 //< 16bit integer samples
85
#define FLOAT_SAMPLES 1 //< 32bit float samples
89
/// Define this to allow CPU-specific assembler optimizations. Notice that
90
/// having this enabled on non-x86 platforms doesn't matter; the compiler can
91
/// drop unsupported extensions on different platforms automatically.
92
/// However, if you're having difficulties getting the optimized routines
93
/// compiled with your compler (e.g. some gcc compiler versions may be picky),
94
/// you may wish to disable the optimizations to make the library compile.
95
#define ALLOW_OPTIMIZATIONS 1
98
// If defined, allows the SIMD-optimized routines to take minor shortcuts
99
// for improved performance. Undefine to require faithfully similar SIMD
100
// calculations as in normal C implementation.
101
#define ALLOW_NONEXACT_SIMD_OPTIMIZATION 1
104
#ifdef INTEGER_SAMPLES
105
// 16bit integer sample type
106
typedef short SAMPLETYPE;
107
// data type for sample accumulation: Use 32bit integer to prevent overflows
108
typedef long LONG_SAMPLETYPE;
111
// check that only one sample type is defined
112
#error "conflicting sample types defined"
113
#endif // FLOAT_SAMPLES
115
#ifdef ALLOW_OPTIMIZATIONS
116
#if (WIN32 || __i386__ || __x86_64__)
117
// Allow MMX optimizations
124
// floating point samples
125
typedef float SAMPLETYPE;
126
// data type for sample accumulation: Use double to utilize full precision.
127
typedef double LONG_SAMPLETYPE;
129
#ifdef ALLOW_OPTIMIZATIONS
130
// Allow 3DNow! and SSE optimizations
132
#define ALLOW_3DNOW 1
135
#if (WIN32 || __i386__ || __x86_64__)
140
#endif // INTEGER_SAMPLES