Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added beginnings of resampling code.

  • Loading branch information
schnarf committed Jun 18, 2008
1 parent 5cb102a commit 0a35ce530d6e4e76c7a9e8b597c7369a038f72b3

File 2 of 3 in 0a35ce5

@@ -142,10 +142,15 @@ typedef struct SDL_AudioCVT
SDL_AudioFormat dst_format; /* Target audio format */
double rate_incr; /* Rate conversion increment */
Uint8 *buf; /* Buffer to hold entire audio data */
Uint8 *sinc; /* Windowed sinc filter */
Uint8 *state_buf; /* Sample history for either the FIR or IIR filter */
int state_pos; /* Position in the state */
int len_sinc; /* Length of windowed sinc filter, in appropriate units (not necessarily bytes) */
int len; /* Length of original audio buffer */
int len_cvt; /* Length of converted audio buffer */
int len_mult; /* buffer must be len*len_mult big */
double len_ratio; /* Given len, final size is len*len_ratio */
int len_div; /* desination length = len_mult / len_div * src length */
double len_ratio; /* Given len, final size is len*len_ratio ( len_ratio = len_mult / len_div ) */
SDL_AudioFilter filters[10]; /* Filter list */
int filter_index; /* Current audio conversion function */
} SDL_AudioCVT;

0 comments on commit 0a35ce5

Please sign in to comment.