comparison libaf/af_export.c @ 24888:b2402b4f0afa

libaf: change filter input/output ratio calculations Change the audio filters to use a double instead of rationals for the ratio of output to input size. The rationals could overflow when calculating the overall ratio of a filter chain and gave no real advantage compared to doubles.
author uau
date Thu, 01 Nov 2007 06:52:01 +0000
parents 76f5d8892c04
children c99d53b76ee5
comparison
equal deleted inserted replaced
24887:484b8eaaf28f 24888:b2402b4f0afa
237 static int af_open( af_instance_t* af ) 237 static int af_open( af_instance_t* af )
238 { 238 {
239 af->control = control; 239 af->control = control;
240 af->uninit = uninit; 240 af->uninit = uninit;
241 af->play = play; 241 af->play = play;
242 af->mul.n = 1; 242 af->mul=1;
243 af->mul.d = 1;
244 af->data = calloc(1, sizeof(af_data_t)); 243 af->data = calloc(1, sizeof(af_data_t));
245 af->setup = calloc(1, sizeof(af_export_t)); 244 af->setup = calloc(1, sizeof(af_export_t));
246 if((af->data == NULL) || (af->setup == NULL)) 245 if((af->data == NULL) || (af->setup == NULL))
247 return AF_ERROR; 246 return AF_ERROR;
248 247