I receive stream like so(simplified for just speed measure):
Code: Select all
static void http_read_task(void* vParam)
{
//................
timestamp1 = pdTICKS_TO_MS(xTaskGetTickCount());
received = 0;
while (1) {
len = esp_http_client_read(client, http_buf, HTTP_BUF_SIZE);
received += len;
dt = pdTICKS_TO_MS(xTaskGetTickCount()) - timestamp1;
if (dt) speed = received*1000/dt;
ESP_LOGI(TAG, "Speed: %ld", speed);
}
}
Some HTTPS stations are stuttering, in code above resulting speed is lower than bitrate.
In my understanding, this stations transmit stream at speed equal to audio bitrate and to have smooth sound we must constantly receive stream without gaps. As I think esp_http_client make gaps in receiving when TLS involved. It's not a network issue, on phone and same AP - all OK.
So, can somthing be done, without deep dive into low level programming of esp32?
