Skip to content

Commit

Permalink
increased i2s-rb size to same size as used by speaker component
Browse files Browse the repository at this point in the history
  • Loading branch information
gnumpi committed Jun 15, 2024
1 parent 817e9bd commit 5f543d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions esphome/components/adf_pipeline/adf_audio_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ int PCMSource::stream_write(char *buffer, int len) {
return 0;
}
int ret = audio_element_output(this->adf_raw_stream_writer_, buffer, len);
if (ret == AEL_IO_TIMEOUT) {
//audio_element_report_status(this->adf_raw_stream_writer_, AEL_STATUS_STATE_FINISHED);
} else if (ret < 0) {
if (ret < 0) {
return 0;
}
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ size_t ADFSpeaker::play(const uint8_t *data, size_t length) {
}

if (this->state_ != speaker::STATE_RUNNING) {
ESP_LOGW(TAG, "Trying to play audio while speaker not running.");
ESP_LOGV(TAG, "Trying to play audio while speaker not running.");
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion esphome/components/i2s_audio/adf_pipeline/adf_i2s_out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool ADFElementI2SOut::init_adf_elements_() {
.i2s_port = this->parent_->get_port(),
.use_alc = this->use_adf_alc_,
.volume = 0,
.out_rb_size = (4 * 1024),
.out_rb_size = (20 * 1024),
.task_stack = I2S_STREAM_TASK_STACK,
.task_core = I2S_STREAM_TASK_CORE,
.task_prio = I2S_STREAM_TASK_PRIO,
Expand Down

0 comments on commit 5f543d1

Please sign in to comment.