comparison include/SDL_audio.h @ 2656:dd74182b3c3c gsoc2008_audio_resampling

Began implementing IIR and FIR filters, and got zero stuffing and sample discarding working.
author Aaron Wishnick <schnarf@gmail.com>
date Wed, 18 Jun 2008 18:55:50 +0000
parents b8e736c8a5a8
children
comparison
equal deleted inserted replaced
2655:b8e736c8a5a8 2656:dd74182b3c3c
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 */ 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 */ 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 */ 147 int state_pos; /* Position in the state */
148 int len_sinc; /* Length of windowed sinc filter, in appropriate units (not necessarily bytes) */ 148 int len_sinc; /* Length of windowed sinc filter, in appropriate units (not necessarily bytes) */
149 int len; /* Length of original audio buffer */ 149 int len; /* Length of original audio buffer */
150 int len_cvt; /* Length of converted audio buffer */ 150 int len_cvt; /* Length of converted audio buffer */
151 int len_mult; /* buffer must be len*len_mult big */ 151 int len_mult; /* buffer must be len*len_mult big */