-
-
Notifications
You must be signed in to change notification settings - Fork 348
A2DP Sink Optimizations
Phil Schatzmann edited this page Oct 21, 2023
·
23 revisions
Different Arduino/IDF versions are using up a different amount of RAM. The more recent the version the more RAM is needed. With the latest change Espressif is also recommending to use a separate ringbuffer and task to manage the output. This option is using additional RAM. You can try to fine tune the memory requirements by calling the following methods before the start():
- set_event_stack_size() - default value is 3K
- set_i2s_stack_size() -default value is 2K
- set_i2s_ringbuffer_size() -default value is 4K
You can use this extended logic by using the BluetoothA2DPSinkQueued class instead of the BluetoothA2DPSink. This way you will need about 6K more RAM. This can potentially correct some lost audio depending of the combination of number of volume changes, the selected log level and the source Operating System (e.g. IOS seems to be potentially a source of trouble here).