mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-30 14:20:52 +03:00
change sample rate between tracks + tweak EMBEDDED option
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user