Streaming troubles #675
-
I have been able to successfuly build and execute the basic-a2dp-audiokit.ino on my AI Thinker Audio Kit board and it plays perfectly. The volume control buttons work as well. I wanted to implement the a2dp input using the A2DPStream class in RX_MODE, but when I did so upon connecting my smartphone and playing the same file as before, all I get is horrible static. I played around with buffer size, buffer counts, sample rates, but nothing seems to make any difference. I was wondering what I might be missing? Here is what my script looks like that is having all the problems: A2DPStream a2dp; StreamCopy copier(kit,a2dp); void setup() { auto cfg = a2dp.defaultConfig(RX_MODE); // setup output } void loop() { ` |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm wondering if I should just use the "BluetoothA2DPSink.h" class instead of the A2DPStream class since it seems like most of your examples are using it for Bluetooth input. I was trying to work toward using the StreamCopy class for handling the input to output routing and using a MultiOutput instance to route the incoming data stream to two destinations. Since I can make things work with the example I stated, is it simply a matter of sending the data to two destinations in the read callback function instead of using the MultiOutput Class, etc.? Thanks very much for your time Herr Schatzmann! |
Beta Was this translation helpful? Give feedback.
-
Oh, you can still use the MultiOutput in the callback: so in the callback you would just write the bytes that you receive to the MultiOutput. |
Beta Was this translation helpful? Give feedback.
Oh, you can still use the MultiOutput in the callback: so in the callback you would just write the bytes that you receive to the MultiOutput.
But your approach works as well...