include/SDL_audio.h
changeset 2720 4eb759edddf5
parent 2049 5f6550e5184f
child 2859 99210400e8b9
equal deleted inserted replaced
2719:eed1bde05821 2720:4eb759edddf5
   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 *coeff;               /* Filter coefficients: either big windowed sinc filter, or 6 IIR lowpass coefficients */
       
   146     Uint8 *state_buf;           /* Sample history for either the FIR or IIR filter. For IIR filter, first two elements are X, second two are Y, and state_pos toggles the order */
       
   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;                /* destination 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