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:
parent
dd59e1d789
commit
fbe9ccc85c
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue