Lines Matching refs:effp
66 static void clear_rms(sox_effect_t * effp) in clear_rms() argument
69 priv_t * silence = (priv_t *) effp->priv; in clear_rms()
79 static int sox_silence_getopts(sox_effect_t * effp, int argc, char **argv) in sox_silence_getopts() argument
81 priv_t * silence = (priv_t *) effp->priv; in sox_silence_getopts()
98 return lsx_usage(effp); in sox_silence_getopts()
103 return lsx_usage(effp); in sox_silence_getopts()
116 return lsx_usage(effp); in sox_silence_getopts()
126 return lsx_usage(effp); in sox_silence_getopts()
132 return lsx_usage(effp); in sox_silence_getopts()
145 return lsx_usage(effp); in sox_silence_getopts()
147 return lsx_usage(effp); in sox_silence_getopts()
167 return lsx_usage(effp); in sox_silence_getopts()
173 return lsx_usage(effp); in sox_silence_getopts()
187 return lsx_usage(effp); in sox_silence_getopts()
224 static int sox_silence_start(sox_effect_t * effp) in sox_silence_start() argument
226 priv_t *silence = (priv_t *)effp->priv; in sox_silence_start()
233 silence->window_size = (effp->in_signal.rate / 50) * in sox_silence_start()
234 effp->in_signal.channels; in sox_silence_start()
237 clear_rms(effp); in sox_silence_start()
242 if (lsx_parsesamples(effp->in_signal.rate, silence->start_duration_str, in sox_silence_start()
244 return lsx_usage(effp); in sox_silence_start()
245 silence->start_duration = temp * effp->in_signal.channels; in sox_silence_start()
249 if (lsx_parsesamples(effp->in_signal.rate,silence->stop_duration_str, in sox_silence_start()
251 return lsx_usage(effp); in sox_silence_start()
252 silence->stop_duration = temp * effp->in_signal.channels; in sox_silence_start()
270 effp->out_signal.length = SOX_UNKNOWN_LEN; /* depends on input data */ in sox_silence_start()
275 static sox_bool aboveThreshold(sox_effect_t const * effp, in aboveThreshold() argument
280 sox_sample_t masked_value = value & (-1 << (32 - effp->in_signal.precision)); in aboveThreshold()
292 static sox_sample_t compute_rms(sox_effect_t * effp, sox_sample_t sample) in compute_rms() argument
294 priv_t * silence = (priv_t *) effp->priv; in compute_rms()
307 static void update_rms(sox_effect_t * effp, sox_sample_t sample) in update_rms() argument
309 priv_t * silence = (priv_t *) effp->priv; in update_rms()
322 static int sox_silence_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obuf, in sox_silence_flow() argument
325 priv_t * silence = (priv_t *) effp->priv; in sox_silence_flow()
347 effp->in_signal.channels; in sox_silence_flow()
351 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
353 threshold |= aboveThreshold(effp, in sox_silence_flow()
354 compute_rms(effp, ibuf[j]), in sox_silence_flow()
362 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
364 update_rms(effp, *ibuf); in sox_silence_flow()
389 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
391 update_rms(effp, ibuf[j]); in sox_silence_flow()
393 ibuf += effp->in_signal.channels; in sox_silence_flow()
394 nrOfInSamplesRead += effp->in_signal.channels; in sox_silence_flow()
405 nrOfTicks -= nrOfTicks % effp->in_signal.channels; in sox_silence_flow()
465 effp->in_signal.channels; in sox_silence_flow()
472 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
474 threshold &= aboveThreshold(effp, in sox_silence_flow()
475 compute_rms(effp, ibuf[j]), in sox_silence_flow()
501 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
503 update_rms(effp, *ibuf); in sox_silence_flow()
513 for (j = 0; j < effp->in_signal.channels; j++) in sox_silence_flow()
515 update_rms(effp, *ibuf); in sox_silence_flow()
552 clear_rms(effp); in sox_silence_flow()
575 effp->in_signal.channels); in sox_silence_flow()
576 nrOfInSamplesRead += (nrOfTicks*effp->in_signal.channels); in sox_silence_flow()
577 nrOfOutSamplesWritten += (nrOfTicks*effp->in_signal.channels); in sox_silence_flow()
587 nrOfTicks -= nrOfTicks % effp->in_signal.channels; in sox_silence_flow()
617 static int sox_silence_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp) in sox_silence_drain() argument
619 priv_t * silence = (priv_t *) effp->priv; in sox_silence_drain()
631 nrOfTicks -= nrOfTicks % effp->in_signal.channels; in sox_silence_drain()
654 static int sox_silence_stop(sox_effect_t * effp) in sox_silence_stop() argument
656 priv_t * silence = (priv_t *) effp->priv; in sox_silence_stop()
665 static int lsx_kill(sox_effect_t * effp) in lsx_kill() argument
667 priv_t * silence = (priv_t *) effp->priv; in lsx_kill()