pipeline怎么循环播放音频?

jumi68
Posts: 2
Joined: Tue Mar 30, 2021 7:24 am

pipeline怎么循环播放音频?

Postby jumi68 » Mon Apr 26, 2021 12:20 pm

用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已在运行,请问怎么循环播放或播放其它音频?

jumi68
Posts: 2
Joined: Tue Mar 30, 2021 7:24 am

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

Postby jumi68 » Tue Apr 27, 2021 6:29 am

在pipeline_sdcard_mp3_control找到了,谢谢

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

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

Postby ESP_HengYC » Thu Apr 29, 2021 9:00 am

好的,ADF 的例程还是很齐全的。 如果当前 ADF 没有的例程需求,可以和我提需求, :lol: :lol:

Who is online

Users browsing this forum: No registered users and 10 guests