00001 /* 00002 00003 TiMidity -- Experimental MIDI to WAVE converter 00004 Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 00020 filter.h : written by Vincent Pagel ( pagel@loria.fr ) 00021 00022 implements fir antialiasing filter : should help when setting sample 00023 rates as low as 8Khz. 00024 00025 */ 00026 00027 #ifdef USE_TIMIDITY_MIDI 00028 00029 #ifndef TIMIDITY_FILTER_H_INCLUDED 00030 #define TIMIDITY_FILTER_H_INCLUDED 00031 00032 #include "timidity.h" 00033 00034 #ifdef NS_TIMIDITY 00035 namespace NS_TIMIDITY { 00036 #endif 00037 00038 /* Order of the FIR filter = 20 should be enough ! */ 00039 #define ORDER 20 00040 #define ORDER2 ORDER/2 00041 00042 #ifndef PI 00043 #define PI 3.14159265 00044 #endif 00045 00046 extern void antialiasing(Sample *sp, sint32 output_rate); 00047 00048 #ifdef NS_TIMIDITY 00049 }; 00050 #endif 00051 00052 #endif 00053 00054 #endif //USE_TIMIDITY_MIDI