Is there a competition between libraries for I2S? #547
-
With the new version of the ESP32-Arduino IDE, there was a change in the I2S API, and consequently some libraries were affected. One of them that I use is ESP32-A2DP, as we saw. On this version of my webradio I use it to transform it into a bluetooth receiver speaker. However, updating that library seems to conflict with the ESP32-audioI2S library, since, even in exclusive programming blocks, the Bluetooth library does not work. However, the A2DP works in an example sketch. Is there a "competition" for I2S in this case? Could anyone help me with an example of integrating the two libraries? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
From a design point of view it would be better if you just use 1 library to do the output: This way you can avoid that you need to program the setup twice and you can avoid any conflicts. In your case this is unfortunately not possible with your selected library, so you would need to make sure that the I2s is properly closed in one library before you start the output with the other library. I am not aware of any other potential conflicts and you would need to build some test cases to identify the root cause... |
Beta Was this translation helpful? Give feedback.
-
I did exactly what you need and it work. https://github.com/Father-Son/ESP32_WebRadio @renatoianhez you can see my project |
Beta Was this translation helpful? Give feedback.
From a design point of view it would be better if you just use 1 library to do the output: This way you can avoid that you need to program the setup twice and you can avoid any conflicts.
In your case this is unfortunately not possible with your selected library, so you would need to make sure that the I2s is properly closed in one library before you start the output with the other library.
I am not aware of any other potential conflicts and you would need to build some test cases to identify the root cause...