1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2012-05-11 06:56:16 -04:00
parent dd59e1d789
commit fbe9ccc85c

View file

@ -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)