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

Code mods #460

Closed mitchjs closed 1 year ago

mitchjs commented 1 year ago

bunch of adds/tweaks here

  1. needed more control of auto reconnect, load last device, but if auto reconnect is off, be able to reconnect still to last.
  2. needed to be able to control when the device was discoverable and connectable (a bit more control)
  3. volume control completed callback, this prevents issues with too fast volume changes by sink
  4. playback status added with toStr() helper
  5. added AVRCP connection callback to know when this service is ready, to allow resume play after reconnecting
  6. other minor tweaks
mitchjs commented 1 year ago

mi heading out on a mini vacation, I'll try to follow this at night, if you have any questions why i changed/added, and of course if there is better way to do something... I have tested this in my project (automotive use bt, where all is controlled by a single apls navigation joystick/rotary encoder)

pschatzmann commented 1 year ago

Uhh, with just a quick look I see some of issues. Could you review your changes again:e.g

mitchjs commented 1 year ago

i didnt do anything with get_name() or bt_name i think that stuff came when i merged your main none of that stuff would even be involved in my project :) does git pr, allow you to edit? im about to head out :)

mitchjs commented 1 year ago

i tested all the stuff around volume changes and playback state changes, and discovery/connectable (really only made a method public) many days of testing.... should be no changes to a2dp source of course, im only dealing with sink

pschatzmann commented 1 year ago

No, I can't do any changes. Take your time: There is no urgency to have this corrected today....

pschatzmann commented 1 year ago

Almost perfect: Could you correct the comment for virtual bool is_avrc_connected(); from // to /// Otherwise Doxygen will not pick up the comment correctly.

pschatzmann commented 1 year ago

Actually, i will pick this up myself