VBAN stream from PC and recieve on ESP #1365
-
Hi, I am trying to receive VBAN stream from PC on ESP32. The code compiles but I am not getting any audio from ESP (output to i2s). I have tested the generator -> i2s which is working. All the VBAN examples are for streaming audio from ESP to PC not the other way round.
I do get the message with my IP address so in the setup it seems the stream in is working - I can even do the VBAN ping but I still don't get any sound out... Any help appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 31 replies
-
Unfortunately I don't have any way to test this, so I suggest that you try to debug it yourself to find out what's going wrong.
|
Beta Was this translation helpful? Give feedback.
-
I think in the beginRx method the connect is missing. Can you check if the following is working ? bool begin_rx(){
start_wifi();
if (WiFi.status() != WL_CONNECTED){
LOGE("Wifi not connected");
return false;
}
WiFi.setSleep(false);
// connect to target
if (!udp.connect(cfg.target_ip, cfg.udp_port)){
LOGE("Could not connect to target");
}
// handle data
udp.onPacket([this](AsyncUDPPacket packet) {
receive_udp(packet);
});
return true;
} |
Beta Was this translation helpful? Give feedback.
-
Just looked at the ESP32 UDP example. Maybe the following might work better:
|
Beta Was this translation helpful? Give feedback.
-
No idea what this could be. Maybe VBAN is sending in network format (=big endian) and I am expecting little endian |
Beta Was this translation helpful? Give feedback.
-
I am not sure where to look for this function. There is:
From where is sourced the
|
Beta Was this translation helpful? Give feedback.
-
Even when I modify your line to: So I assume that a) check is not working b) check is always triggered once and later ignored (you set the flag to true than never reset it back). It does not seems to be triggered anyway (I tried to put LOGE fce there to see if it triggered and did not get anything out of it). I still don't understand how that should affect the function but I am just reporting back my findings. |
Beta Was this translation helpful? Give feedback.
-
The idea was to report available() data only after the buffer has been filled by 50%. Before it will report 0, so nothing is copied. |
Beta Was this translation helpful? Give feedback.
-
Ah I see, sorry to hear that. I plan to implement the VBAN stream in Processing Java so we can have build for any OS. |
Beta Was this translation helpful? Give feedback.
-
Hi, I can confirm it is now working on esp32s2. Minor issue remains that it does not conform to changing sampleRate to anything elese than 44100Hz - if I go lower or higher I will get artifacts. I can see you have function in the source code for dynamically changing this from the VBAN header but somehow it is not working - the same is true when I try to change it in config when starting the stream (ie hardcode in the beginning).
|
Beta Was this translation helpful? Give feedback.
In order to reproduce this I had to buy the Talky Android app!
The worst error was, that the data was read from the wrong address. It is working much better now...
I also changed the buffer to use a thread save implementation and extended the API where you can define an output object, so that no copy is needed.