MusicKit  0.0.0
SndResample.h
00001 /*
00002  * $Id$
00003  *
00004  * The configuration constants below govern the number of bits in the 
00005  * input sample and filter coefficients, the 
00006  * number of bits to the right of the binary-point for fixed-point math, etc.
00007  *
00008  * Portions Copyright (c) 1999, The MusicKit Project.  All rights reserved.
00009  *
00010  * Permission is granted to use and modify this code for commercial and
00011  * non-commercial purposes so long as the author attribution and copyright
00012  * messages remain intact and accompany all relevant code.
00013  *
00014  */
00015 #if HAVE_CONFIG_H
00016 # include "SndKitConfig.h"
00017 #endif
00018 #include "SndFormat.h"
00019 
00020 /* Conversion constants */
00021 #define Nhc       8
00022 #define Na        7
00023 #define Np       (Nhc+Na)
00024 #define Npc      (1<<Nhc)
00025 #define Amask    ((1<<Na)-1)
00026 #define Pmask    ((1<<Np)-1)
00027 #define Nh       16
00028 #define Nb       16
00029 #define Nhxn     14
00030 #define Nhg      (Nh-Nhxn)
00031 #define NLpScl   13
00032 
00103 SNDKIT_API int resample(        
00104     double factor,              
00105     SND_HWORD *outPtr,
00106     int  inCount,               
00107     int  outCount,              
00108     int  nChans,                        
00109     BOOL interpFilt,
00110     int  fastMode,              
00111     BOOL largeFilter,
00112     char *filterFile,
00113     const SndFormat inSnd,
00114     int  resampleFrom,  
00115     void *inData
00116 );