mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix:Report the full buffer length to the UAC stack by setting bytes_read in usb_uac_device_input_cb(), so the host correctly detects received audio data instead of seeing zero bytes.
This commit is contained in:
@@ -236,6 +236,11 @@ static esp_err_t usb_uac_device_input_cb(uint8_t *buf, size_t len, size_t *bytes
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
/* Report full-length data for UAC */
|
||||
if (bytes_read) {
|
||||
*bytes_read = len;
|
||||
}
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user