You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use your ESP32-Web-Radio, with an ESP8266, but it still works fine
Now, I wanted to add a buffer so that internet lag will not directly lead to a jumping MP3 stream. I did this by changing mp3buff to bufferptr with a length of 320, which I wanted to fill up with chunks of 32 bytes to be played by the player later.
I noticed the following:
// This works
void loop() {
...
if (client.available() > 0)
{
uint8_t bytesread = client.read(bufferptr, 32);
player.playChunk(bufferptr, bytesread);
}
...
}
// This doesn't work
bool written = false;
void loop() {
...
if (client.available() > 0 && !written)
{
uint8_t bytesread = client.read(bufferptr, 32);
written = true;
}
if(written) {
player.playChunk(bufferptr, 32);
written = false;
}
...
}
It should be the same, right? In both cases I let client.read fill up 32 bytes of the buffer at bufferptr before I play the chunk. In case 2 there is an Exception (9) though ...
Can you help me with this?
The text was updated successfully, but these errors were encountered:
I use your ESP32-Web-Radio, with an ESP8266, but it still works fine
Now, I wanted to add a buffer so that internet lag will not directly lead to a jumping MP3 stream. I did this by changing mp3buff to bufferptr with a length of 320, which I wanted to fill up with chunks of 32 bytes to be played by the player later.
I noticed the following:
It should be the same, right? In both cases I let client.read fill up 32 bytes of the buffer at bufferptr before I play the chunk. In case 2 there is an Exception (9) though ...
Can you help me with this?
The text was updated successfully, but these errors were encountered: