comparison libaf/af_delay.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 fd6f824ef894
children 72d0b1444141
comparison
equal deleted inserted replaced
24887:484b8eaaf28f 24888:b2402b4f0afa
165 // Allocate memory and set function pointers 165 // Allocate memory and set function pointers
166 static int af_open(af_instance_t* af){ 166 static int af_open(af_instance_t* af){
167 af->control=control; 167 af->control=control;
168 af->uninit=uninit; 168 af->uninit=uninit;
169 af->play=play; 169 af->play=play;
170 af->mul.n=1; 170 af->mul=1;
171 af->mul.d=1;
172 af->data=calloc(1,sizeof(af_data_t)); 171 af->data=calloc(1,sizeof(af_data_t));
173 af->setup=calloc(1,sizeof(af_delay_t)); 172 af->setup=calloc(1,sizeof(af_delay_t));
174 if(af->data == NULL || af->setup == NULL) 173 if(af->data == NULL || af->setup == NULL)
175 return AF_ERROR; 174 return AF_ERROR;
176 return AF_OK; 175 return AF_OK;