Issue when trying to connect AudioPlayer to a internet Radio. After first AudiCopy the sample rate, port and mode are changed #791
-
Hi, I am trying to connect my Esp32 with a different Radio over the internet. I am configuring the i2s in the setup of my program as: I set port to 1 due to I have other state using the port 0 of i2s with A2DP. auto config = i2s.defaultConfig(TX_MODE);// Test con tx mode I call the player.begin() in the first state of my machine state as: (only once) Then in the Loop, I am calling the player.copy(). I can see that I am configuring a TX mode in my i2s but unfortunately, I am seeing that once the first Audicopy is called**[I] AudioCopy.h : 136 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops**, then the mode is changed to RX mode. Besides the sample rate is different and the port has changed. The traces are these: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
There is no way I can help because I have no clue what you are doing. |
Beta Was this translation helpful? Give feedback.
-
Hi, I found out what is the problem. I have two instances of player, one for taking data from the internet and the other for taking data over mp3.: I2SStream i2s; //DAC output const char startFilePath="/"; When I comment on the mp3 player the code works, but when I put these instances the code don't work and also shows me the following: AudioCopy.h : 136 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops |
Beta Was this translation helpful? Give feedback.
-
The message is pretty speaking: setAudioInfo()! I don't know what more I should say... |
Beta Was this translation helpful? Give feedback.
-
what should I do instead of having two instances? |
Beta Was this translation helpful? Give feedback.
-
Just use one and change the source or output when you need to! |
Beta Was this translation helpful? Give feedback.
The message is pretty speaking: setAudioInfo()! I don't know what more I should say...
ps. I don't see any reason why you would have two instances AudioPlayer.