pschatzmann / ESP32-A2DP

A Simple ESP32 Bluetooth A2DP Library (to implement a Music Receiver or Sender) that supports Arduino, PlatformIO and Espressif IDF
Apache License 2.0
1.65k stars 270 forks source link

Compilation error with bt_music_sender example #466

Closed d3mac123 closed 1 year ago

d3mac123 commented 1 year ago

Hi,

I am trying to learn how to play a sound from my m5stack ATOM Matrix to my Bluetooth headphones. It is basically a countdown (my initial idea was to use the Talkie library but I couldn't make it work).

Assuming this is possible, I tried to use the bt_music_sender example but I am getting the following error (on Arduino IDE 2.2). Any ideas on what I am doing wrong?

`/Users/alexsouza/Documents/Arduino/libraries/ESP32-A2DP/src/BluetoothA2DPSource.cpp: In member function 'virtual void BluetoothA2DPSource::bt_app_gap_callback(esp_bt_gap_cb_event_t, esp_bt_gap_cb_param_t*)': /Users/alexsouza/Documents/Arduino/libraries/ESP32-A2DP/src/BluetoothA2DPSource.cpp:546:8: error: 'ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT' was not declared in this scope case ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT: ^~~~~~~~~ /Users/alexsouza/Documents/Arduino/libraries/ESP32-A2DP/src/BluetoothA2DPSource.cpp:546:8: note: suggested alternative: 'ESP_BT_GAP_QOS_CMPL_EVT' case ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT: ^~~~~~~~~ ESP_BT_GAP_QOS_CMPL_EVT

exit status 1

Compilation error: exit status 1`

pschatzmann commented 1 year ago

Please don't ignore that I am asking for Software Versions. The Arduino Version is irrelevant. You need to provide the ESP32 Core Version.

https://github.com/pschatzmann/ESP32-A2DP/wiki/Reporting-Bugs

To simplify the implementation of your project, I suggest that you use the AudioTools as suggested in the README. Please note that the different TTS libraries are using different sample rates and usually only one channel, so you will need to convert the format. Good TTS libraries are using a lot of PROGMEM as does the A2DP library, so you might hit the limits of the ESP32 quite quickly. My Simple TTS library might be a good starting point, but you might need to slim down the dictionary.

To resolve your compile errors do either

d3mac123 commented 1 year ago

Phil, thank you so much for your input. Just started playing with ESP/Arduino boards, this was very valuable. I really appreciated that.

I will try to address the memory issues I am having now to, then, see how to implement the Simple TTS library into the project.

Again, thanks a lot!