what is the proper way to have both mmc source and a2dp sink active together (but used exclusively) #856
-
During most part of the device operation i use sdmmc as source (with the player api), however, whenever A2DP sink is connected i want it to be the active "player", what is the proper way to do this? Is there any project in the examples? (i did not find). |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
What have you tried ? I am just not sure if there is enough RAM for decoding mp3, after a2dp has been started, so you might need to have a processor with spiram or play wav files |
Beta Was this translation helpful? Give feedback.
-
well, finally i just put both objects together, sharing the i2c object and it did not cause any problem, and both the sd player and a2dp sink can be used without any problem, which is nice and convenient. |
Beta Was this translation helpful? Give feedback.
-
n.b yes i use an esp32d0wdr2 which has 2MB of SPIRAM, although i did not check how much of it has been allocated by audio-tools, what i can say is that the IDF itself does not take adavantage of the SPIRAM on the wifi and bluetooth stack much, despite i changed the menuconfig options and recompiled all core libraries. When we set all setting to use SPIRAM in priority it does only allocate about 50KB on it for bluetooth and wifi stacks. |
Beta Was this translation helpful? Give feedback.
-
I was mainly thinking about the RAM use of the codecs. Did you already try this? |
Beta Was this translation helpful? Give feedback.
-
oh, no, thank's, i was not aware of this, i will try it for sure |
Beta Was this translation helpful? Give feedback.
What have you tried ?
I don't quite understand your question: All the necessary functionality is available.
Did you have a look at the available methods of BluetoothA2DPSink ? There are callback methods to react on changes of the connection state or audio state...
I am just not sure if there is enough RAM for decoding mp3, after a2dp has been started, so you might need to have a processor with spiram or play wav files