Page 1 of 1

pipeline怎么循环播放音频?

Posted: Mon Apr 26, 2021 12:20 pm
by jumi68
用sdcard_MP3例子修改为循环播放出错?
/* Stop when the last pipeline element (i2s_stream_writer in this case) receives stop event */
if (msg.source_type == AUDIO_ELEMENT_TYPE_ELEMENT && msg.source == (void *) i2s_stream_writer
&& msg.cmd == AEL_MSG_CMD_REPORT_STATUS
&& (((int)msg.data == AEL_STATUS_STATE_STOPPED) || ((int)msg.data == AEL_STATUS_STATE_FINISHED))) {
ESP_LOGW(TAG, "[ * ] Stop event received");
//break;

audio_pipeline_terminate(pipeline);
audio_element_set_uri(fatfs_stream_reader, "/sdcard/zsh.mp3");
audio_pipeline_run(pipeline);
}

提示pipeline已在运行,请问怎么循环播放或播放其它音频?

Re: pipeline怎么循环播放音频?

Posted: Tue Apr 27, 2021 6:29 am
by jumi68
在pipeline_sdcard_mp3_control找到了,谢谢

Re: pipeline怎么循环播放音频?

Posted: Thu Apr 29, 2021 9:00 am
by ESP_HengYC
好的,ADF 的例程还是很齐全的。 如果当前 ADF 没有的例程需求,可以和我提需求, :lol: :lol: