Changing i2s sample rate dynamically
-
- Posts: 7
- Joined: Wed Jun 21, 2023 11:47 am
Changing i2s sample rate dynamically
Does anybody know how to change the i2s sample rate during execution time ? The .sample_rate bellow i2s_config_t i2s_config = ... accepts only constants, so there is no way to change that value during the program execution. Any help will be appreciated. Thanks
-
- Posts: 40
- Joined: Wed Jun 22, 2022 12:10 pm
Re: Changing i2s sample rate dynamically
i2s has following API:
esp_err_t i2s_stream_set_clk(audio_element_handle_t i2s_stream, int rate, int bits, int ch);
the rate setting is the sample_rate settings, please make sure the input data rate and I2S sample rate is matched or else the tone will listen to be strange
esp_err_t i2s_stream_set_clk(audio_element_handle_t i2s_stream, int rate, int bits, int ch);
the rate setting is the sample_rate settings, please make sure the input data rate and I2S sample rate is matched or else the tone will listen to be strange
Who is online
Users browsing this forum: No registered users and 40 guests