Lines Matching refs:i

95         int i;  in sox_chorus_getopts()  local
99 i = 0; in sox_chorus_getopts()
104 sscanf(argv[i++], "%f", &chorus->in_gain); in sox_chorus_getopts()
105 sscanf(argv[i++], "%f", &chorus->out_gain); in sox_chorus_getopts()
106 while ( i < argc ) { in sox_chorus_getopts()
112 sscanf(argv[i++], "%f", &chorus->delay[chorus->num_chorus]); in sox_chorus_getopts()
113 sscanf(argv[i++], "%f", &chorus->decay[chorus->num_chorus]); in sox_chorus_getopts()
114 sscanf(argv[i++], "%f", &chorus->speed[chorus->num_chorus]); in sox_chorus_getopts()
115 sscanf(argv[i++], "%f", &chorus->depth[chorus->num_chorus]); in sox_chorus_getopts()
116 if ( !strcmp(argv[i], "-s")) in sox_chorus_getopts()
118 else if ( ! strcmp(argv[i], "-t")) in sox_chorus_getopts()
122 i++; in sox_chorus_getopts()
134 int i; in sox_chorus_start() local
154 for ( i = 0; i < chorus->num_chorus; i++ ) { in sox_chorus_start()
155 chorus->samples[i] = (int) ( ( chorus->delay[i] + in sox_chorus_start()
156 chorus->depth[i] ) * effp->in_signal.rate / 1000.0); in sox_chorus_start()
157 chorus->depth_samples[i] = (int) (chorus->depth[i] * in sox_chorus_start()
160 if ( chorus->delay[i] < 20.0 ) in sox_chorus_start()
165 if ( chorus->delay[i] > 100.0 ) in sox_chorus_start()
170 if ( chorus->speed[i] < 0.1 ) in sox_chorus_start()
175 if ( chorus->speed[i] > 5.0 ) in sox_chorus_start()
180 if ( chorus->depth[i] < 0.0 ) in sox_chorus_start()
185 if ( chorus->depth[i] > 10.0 ) in sox_chorus_start()
190 if ( chorus->decay[i] < 0.0 ) in sox_chorus_start()
195 if ( chorus->decay[i] > 1.0 ) in sox_chorus_start()
200 chorus->length[i] = effp->in_signal.rate / chorus->speed[i]; in sox_chorus_start()
201 chorus->lookup_tab[i] = lsx_malloc(sizeof (int) * chorus->length[i]); in sox_chorus_start()
203 if (chorus->modulation[i] == MOD_SINE) in sox_chorus_start()
204 lsx_generate_wave_table(SOX_WAVE_SINE, SOX_INT, chorus->lookup_tab[i], in sox_chorus_start()
205 … (size_t)chorus->length[i], 0., (double)chorus->depth_samples[i], 0.); in sox_chorus_start()
207 lsx_generate_wave_table(SOX_WAVE_TRIANGLE, SOX_INT, chorus->lookup_tab[i], in sox_chorus_start()
208 (size_t)chorus->length[i], in sox_chorus_start()
209 … (double)(chorus->samples[i] - 1 - 2 * chorus->depth_samples[i]), in sox_chorus_start()
210 (double)(chorus->samples[i] - 1), 3 * M_PI_2); in sox_chorus_start()
211 chorus->phase[i] = 0; in sox_chorus_start()
213 if ( chorus->samples[i] > chorus->maxsamples ) in sox_chorus_start()
214 chorus->maxsamples = chorus->samples[i]; in sox_chorus_start()
219 for ( i = 0; i < chorus->num_chorus; i++ ) in sox_chorus_start()
220 sum_in_volume += chorus->decay[i]; in sox_chorus_start()
226 for ( i = 0; i < chorus->maxsamples; i++ ) in sox_chorus_start()
227 chorus->chorusbuf[i] = 0.0; in sox_chorus_start()
245 int i; in sox_chorus_flow() local
256 for ( i = 0; i < chorus->num_chorus; i++ ) in sox_chorus_flow()
258 chorus->counter - chorus->lookup_tab[i][chorus->phase[i]]) % in sox_chorus_flow()
259 chorus->maxsamples] * chorus->decay[i]; in sox_chorus_flow()
268 for ( i = 0; i < chorus->num_chorus; i++ ) in sox_chorus_flow()
269 chorus->phase[i] = in sox_chorus_flow()
270 ( chorus->phase[i] + 1 ) % chorus->length[i]; in sox_chorus_flow()
283 int i; in sox_chorus_drain() local
293 for ( i = 0; i < chorus->num_chorus; i++ ) in sox_chorus_drain()
295 chorus->counter - chorus->lookup_tab[i][chorus->phase[i]]) % in sox_chorus_drain()
296 chorus->maxsamples] * chorus->decay[i]; in sox_chorus_drain()
305 for ( i = 0; i < chorus->num_chorus; i++ ) in sox_chorus_drain()
306 chorus->phase[i] = in sox_chorus_drain()
307 ( chorus->phase[i] + 1 ) % chorus->length[i]; in sox_chorus_drain()
325 int i; in sox_chorus_stop() local
329 for ( i = 0; i < chorus->num_chorus; i++ ) { in sox_chorus_stop()
330 free(chorus->lookup_tab[i]); in sox_chorus_stop()
331 chorus->lookup_tab[i] = NULL; in sox_chorus_stop()