From fbe9ccc85cbbd4355415694990fe58003c5c2beb Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 11 May 2012 06:56:16 -0400 Subject: TDSpeed settings to setup call need to be recorded, always. If the settings, like samplerate, were to go out of range where timestretch drops out of processing and then go back to the same as when they were valid, it would fail to switch back on by itelf. Change-Id: Ic5bcb268540b0db8e0483117b8a5a0ce5c5a9db0 --- lib/rbcodec/dsp/tdspeed.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/rbcodec') diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c index 412d889ee8..8f32a62e0e 100644 --- a/lib/rbcodec/dsp/tdspeed.c +++ b/lib/rbcodec/dsp/tdspeed.c @@ -127,6 +127,10 @@ static bool tdspeed_update(int32_t samplerate, int32_t factor) { struct tdspeed_state_s *st = &tdspeed_state; + /* Save parameters we'll need later if format changes */ + st->samplerate = samplerate; + st->factor = factor; + /* Check parameters */ if (factor == PITCH_SPEED_100) return false; @@ -137,10 +141,6 @@ static bool tdspeed_update(int32_t samplerate, int32_t factor) if (factor < STRETCH_MIN || factor > STRETCH_MAX) return false; - /* Save parameters we'll need later if format changes */ - st->samplerate = samplerate; - st->factor = factor; - st->dst_step = samplerate / MINFREQ; if (factor > PITCH_SPEED_100) -- cgit v1.2.3