*Silences*(spaces) in sound stream on bluetooth speaker #490
-
Hi, I got "spaces" in between sound stream, while testing example mp3 file from SD card to Bluetooth speaker, maybe need increase some buffer size ?
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
how did you record this? 1:1 digital bit stream output or with some analog steps involved? It is not complete silence, so without analog steps it can‘t be a buffer issue but a calculation problem. |
Beta Was this translation helpful? Give feedback.
-
You did not write how often this happens, so I did some tests myself and for some files I could notice some rate small breaks - maybe 1 per 1 or 2 minutes. I don't think that this is related to the buffer size: it is aleady very big: 1280 * 50 bytes! The current implementation is using a RingBuffer which is synchronized with a semaphore. I think the most promising approach would be to replace this with the new SynchronizedBufferRTOS (described here) Do you want to pick this up ? |
Beta Was this translation helpful? Give feedback.
-
I made some test sketch with the SynchronizedBufferRTOS using the A2DP API and it is actually worse! |
Beta Was this translation helpful? Give feedback.
-
I finally managed to have a synchronized buffer implementation with consistent timing, so the basic example is working consistently with perfect qulality for me now. If you still have issues with this sketch you can try to do some performance measurment on your system: |
Beta Was this translation helpful? Give feedback.
I made some test sketch with the SynchronizedBufferRTOS using the A2DP API and it is actually worse!
https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/sandbox/base-player-a2dp/base-player-a2dp.ino