00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 // 00011 // Last changed : $Date$ 00012 // File revision : $Revision$ 00013 // 00014 // $Id$ 00015 // 00017 // 00018 // License : 00019 // 00020 // SoundTouch audio processing library 00021 // Copyright (c) Olli Parviainen 00022 // 00023 // This library is free software; you can redistribute it and/or 00024 // modify it under the terms of the GNU Lesser General Public 00025 // License as published by the Free Software Foundation; either 00026 // version 2.1 of the License, or (at your option) any later version. 00027 // 00028 // This library is distributed in the hope that it will be useful, 00029 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00030 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00031 // Lesser General Public License for more details. 00032 // 00033 // You should have received a copy of the GNU Lesser General Public 00034 // License along with this library; if not, write to the Free Software 00035 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00036 // 00038 00039 #ifndef STTypes_H 00040 #define STTypes_H 00041 00042 typedef unsigned int uint; 00043 typedef unsigned long ulong; 00044 00045 #ifndef _WINDEF_H 00046 // if these aren't defined already by Windows headers, define now 00047 00048 typedef int BOOL; 00049 00050 #ifndef FALSE 00051 #define FALSE 0 00052 #endif 00053 #ifndef TRUE 00054 #define TRUE 1 00055 #endif 00056 00057 #endif // _WINDEF_H 00058 00059 #define MULTICHANNEL 8 00060 00061 namespace soundtouch 00062 { 00065 //#undef INTEGER_SAMPLES 00066 //#undef FLOAT_SAMPLES 00067 00068 #if !(INTEGER_SAMPLES || FLOAT_SAMPLES) 00069 00084 //#define INTEGER_SAMPLES 1 //< 16bit integer samples 00085 #define FLOAT_SAMPLES 1 //< 32bit float samples 00086 00087 #endif 00088 00095 #define ALLOW_OPTIMIZATIONS 1 00096 00097 00098 // If defined, allows the SIMD-optimized routines to take minor shortcuts 00099 // for improved performance. Undefine to require faithfully similar SIMD 00100 // calculations as in normal C implementation. 00101 #define ALLOW_NONEXACT_SIMD_OPTIMIZATION 1 00102 00103 00104 #ifdef INTEGER_SAMPLES 00105 // 16bit integer sample type 00106 typedef short SAMPLETYPE; 00107 // data type for sample accumulation: Use 32bit integer to prevent overflows 00108 typedef long LONG_SAMPLETYPE; 00109 00110 #ifdef FLOAT_SAMPLES 00111 // check that only one sample type is defined 00112 #error "conflicting sample types defined" 00113 #endif // FLOAT_SAMPLES 00114 00115 #ifdef ALLOW_OPTIMIZATIONS 00116 #if _WIN32 || __MMX__ || MMX 00117 // Allow MMX optimizations 00118 #define ALLOW_MMX 1 00119 #endif 00120 #endif 00121 00122 #else 00123 00124 // floating point samples 00125 typedef float SAMPLETYPE; 00126 // data type for sample accumulation: Use double to utilize full precision. 00127 typedef double LONG_SAMPLETYPE; 00128 00129 #ifdef ALLOW_OPTIMIZATIONS 00130 // Allow 3DNow! and SSE optimizations 00131 #if WIN32 00132 #define ALLOW_3DNOW 1 00133 #endif 00134 #endif 00135 00136 #endif // INTEGER_SAMPLES 00137 }; 00138 00139 #endif
1.6.3