Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/AudioTools/CoreAudio/AudioAnalog/AnalogConfigESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace audio_tools {
*/
class AnalogConfigESP32 : public AudioInfo {
public:
TickType_t timeout = portMAX_DELAY;
int buffer_count = ANALOG_BUFFER_COUNT;
int buffer_size = ANALOG_BUFFER_SIZE;
RxTxMode rx_tx_mode;
Expand Down
4 changes: 2 additions & 2 deletions src/AudioTools/CoreAudio/AudioAnalog/AnalogDriverESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class AnalogDriverESP32 : public AnalogDriverBase {
size_t readBytes(uint8_t *dest, size_t size_bytes) override {
TRACED();
size_t result = 0;
if (i2s_read(port_no, dest, size_bytes, &result, portMAX_DELAY)!=ESP_OK){
if (i2s_read(port_no, dest, size_bytes, &result, adc_config.timeout)!=ESP_OK){
TRACEE();
}
// make sure that the center is at 0
Expand Down Expand Up @@ -288,7 +288,7 @@ class AnalogDriverESP32 : public AnalogDriverBase {
}

if (output_size>0){
if (i2s_write(port_no, src, output_size, &result, portMAX_DELAY)!=ESP_OK){
if (i2s_write(port_no, src, output_size, &result, adc_config.timeout)!=ESP_OK){
LOGE("%s: %d", LOG_METHOD, output_size);
}
}
Expand Down