esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

stop/resume the audio pipeline crash (AUD-3021)

Open iloop2020 opened this issue 3 years ago • 6 comments

Hi ,

I found if we stop/resume the audio pipeline too fast, ESP32 will crash at audio_pipeline_stop(), I suspect the resume() is not completely ready and call stop() will crash.

  1. audio_pipeline_stop()
  2. audio_pipeline_wait_for_stop()
  3. audio_pipeline_resume()
  4. Go to 1.

Please help.

Thank you

iloop2020 avatar May 18 '21 15:05 iloop2020

Hi @iloop2020

I don’t recommend that you use it in this order.

Generally, we use pipeline start and stop in pairs, pipeline pause and resume as the same way.

When you are already stop a pipeline then continue to resume the pipeline, maybe got an issue.

HengYongChao avatar May 19 '21 12:05 HengYongChao

Hi @HengYongChao

Thank you for your support, it is good to know more in detail.

  1. Can you list out the API pairs that should be called?
  2. What is different between audio_pipeline_terminate() and audio_pipeline_stop() ?

Thank you.

iloop2020 avatar May 19 '21 14:05 iloop2020

Hi @HengYongChao

The document shows the stop() can be use with resume(), please check. image

Thank you

iloop2020 avatar May 19 '21 16:05 iloop2020

Hi @iloop2020

Sorry, I thought you were using the audio_pipeline_terminate function, resume is more like restart sometime. In the above case, you can surely use resume.

Please post the crash log here.

HengYongChao avatar May 20 '21 03:05 HengYongChao

Hi @HengYongChao

Can you share the API call flow/produce, to switch between Bluetooth A2DP and SDCard MP3 file playback. ?

Thank you

iloop2020 avatar May 23 '21 08:05 iloop2020

Hi @HengYongChao

  1. What is the different between audio_pipeline_pause() and audio_pipeline_stop() ?
  2. And the relation between audio_pipeline_start() and audio_pipeline_resume() ?

Thank you

iloop2020 avatar May 29 '21 01:05 iloop2020

This topic has become inactive so I'm going to close the issue. Please reopen this if you have any questions or need any further assistance.

jason-mao avatar Sep 05 '23 08:09 jason-mao