Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio_pipeline_stop无法立即停止http_stream_read_mp3的pipeline (AUD-5989) #1348

Open
casitelwithdean opened this issue Jan 14, 2025 · 0 comments

Comments

@casitelwithdean
Copy link

casitelwithdean commented Jan 14, 2025

IDF 5.4 RC-1
ADF Master
使用芯片是 esp32 s3 wroom1 n16r8
我使用的pipeline是 http_read-->mp3-->i2s,因为经常需要开启和关闭这个pipeline,但是关闭的时候有时候会等上1至2秒(有时甚至更久),才能完全关闭pipeline,即audio_pipeline_wait_for_stop不再阻塞。
我个人分析:这1至2秒的时间都花费在了http的读包的过程中,

int r_size = audio_element_input(self, in_buffer, in_len);
这个函数内部里的read_cb.cb一直在读包,默认一包是4096b,如果他没有读完这4096b的话,那么这个pipeline就不会关闭。 然后尤其是在刚和MP3建立连接的过程中,那么读取第一包4096b的时间将会比较长,有时甚至3~4秒(可能和网络有一些原因)。
所以有没有立马将含有http_stream_read的pipeline立马停止的方法呢?或许说强制性的将读取4096b的这个过程给打断,从而完全关闭pipeline呢?
谢谢

@github-actions github-actions bot changed the title audio_pipeline_stop无法立即停止http_stream_read_mp3的pipeline audio_pipeline_stop无法立即停止http_stream_read_mp3的pipeline (AUD-5989) Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant