include/SDL_audio.h
branchgsoc2008_audio_resampling
changeset 2655 b8e736c8a5a8
parent 2049 5f6550e5184f
child 2656 dd74182b3c3c
equal deleted inserted replaced
2654:2e14bdaaff18 2655:b8e736c8a5a8
   140     int needed;                 /* Set to 1 if conversion possible */
   140     int needed;                 /* Set to 1 if conversion possible */
   141     SDL_AudioFormat src_format; /* Source audio format */
   141     SDL_AudioFormat src_format; /* Source audio format */
   142     SDL_AudioFormat dst_format; /* Target audio format */
   142     SDL_AudioFormat dst_format; /* Target audio format */
   143     double rate_incr;           /* Rate conversion increment */
   143     double rate_incr;           /* Rate conversion increment */
   144     Uint8 *buf;                 /* Buffer to hold entire audio data */
   144     Uint8 *buf;                 /* Buffer to hold entire audio data */
       
   145 	Uint8 *sinc;				/* Windowed sinc filter */
       
   146 	Uint8 *state_buf;			/* Sample history for either the FIR or IIR filter */
       
   147 	int state_pos;				/* Position in the state */
       
   148 	int len_sinc;				/* Length of windowed sinc filter, in appropriate units (not necessarily bytes) */
   145     int len;                    /* Length of original audio buffer */
   149     int len;                    /* Length of original audio buffer */
   146     int len_cvt;                /* Length of converted audio buffer */
   150     int len_cvt;                /* Length of converted audio buffer */
   147     int len_mult;               /* buffer must be len*len_mult big */
   151     int len_mult;               /* buffer must be len*len_mult big */
   148     double len_ratio;           /* Given len, final size is len*len_ratio */
   152 	int len_div;				/* desination length = len_mult / len_div * src length */
       
   153     double len_ratio;           /* Given len, final size is len*len_ratio ( len_ratio = len_mult / len_div ) */
   149     SDL_AudioFilter filters[10];        /* Filter list */
   154     SDL_AudioFilter filters[10];        /* Filter list */
   150     int filter_index;           /* Current audio conversion function */
   155     int filter_index;           /* Current audio conversion function */
   151 } SDL_AudioCVT;
   156 } SDL_AudioCVT;
   152 
   157 
   153 
   158