change sample rate between tracks + tweak EMBEDDED option

This commit is contained in:
philippe44
2019-06-29 21:02:30 -07:00
parent 36428f357b
commit 4b8790cf88
3 changed files with 14 additions and 11 deletions

View File

@@ -305,11 +305,11 @@ static void *output_thread_i2s() {
isI2SStarted=true;
LOG_INFO("Restarting I2S.");
i2s_start(CONFIG_I2S_NUM);
if( i2s_config.sample_rate != output.current_sample_rate)
{
i2s_config.sample_rate = output.current_sample_rate;
i2s_set_sample_rates(CONFIG_I2S_NUM, i2s_config.sample_rate);
}
}
if (i2s_config.sample_rate != output.current_sample_rate) {
LOG_INFO("changing sampling rate %u to %u", i2s_config.sample_rate, output.current_sample_rate);
i2s_config.sample_rate = output.current_sample_rate;
i2s_set_sample_rates(CONFIG_I2S_NUM, i2s_config.sample_rate);
}
count++;
LOG_SDEBUG("Outputting to I2S");