Help with analog audio streaming via adc #530
-
Hi again. as you said before responding to discussion #493 I tried to see the simple streaming output.
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
Your sample rate is completely wrong, you need to provide the samples in the speed required by A2DP ! |
Beta Was this translation helpful? Give feedback.
-
A2DP only supports 44100 |
Beta Was this translation helpful? Give feedback.
-
The only thing that I can think of is to fill a buffer first and then serve the data from the buffer. Life streaming is difficult and it is much easier to just send prerecorded audio e.g. from a file. I would run the output thru a resampler with an initial factor 1.0 and when you see that the buffer is running full or empty adust the re-sampling rate... |
Beta Was this translation helpful? Give feedback.
-
I got clear output connecting both GPIO34 , GPIO14 and sampling rate of 44100. I need to know why it disconnects after about 35 seconds. If it is because of buffering , is there any guidance to resolve it? |
Beta Was this translation helpful? Give feedback.
-
Phil, thanks so much for your time. |
Beta Was this translation helpful? Give feedback.
-
. |
Beta Was this translation helpful? Give feedback.
-
My gut feeling is that A2DP notices that it does not get the data that is needed to play at a stable speed. The solution approach has been described above: you would need to link a PID controller to micro manage a Resampler is small steps to avoid any buffer over and underruns. You can try to increase I2S Sample Rate around 44100 a bit, to avoid buffer underruns, but in the end this will just lead to buffer over runs with some lost audio data... To reconfrm my assumption you could try out this sketch: https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-basic-api/base-player-a2dp/base-player-a2dp.ino |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Your sample rate is completely wrong, you need to provide the samples in the speed required by A2DP !