From 29cfd29a6cafea88a36212292e7019ab88aa7ed2 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 21 May 2012 17:12:04 -0400 Subject: Stop timestretch freezing things during format changes. When it was inactive but enabled, the format change hook was dropping through to code that it shouldn't execute without it also being active in processing samples. Change-Id: Ie7899df0395d3f0d10f2bf2b55ea549dd06749a7 --- lib/rbcodec/dsp/tdspeed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c index 92dfb31bed..6a495bd989 100644 --- a/lib/rbcodec/dsp/tdspeed.c +++ b/lib/rbcodec/dsp/tdspeed.c @@ -478,7 +478,8 @@ static void tdspeed_process_new_format(struct dsp_proc_entry *this, struct sample_format *format = &src->format; int channels = format->num_channels; - if (format->codec_frequency != st->samplerate) + if (format->codec_frequency != st->samplerate || + !dsp_proc_active(dsp, DSP_PROC_TIMESTRETCH)) { /* relevent parameters are changing - all overlap will be discarded */ st->channels = channels; -- cgit v1.2.3