Hi,
I followed the examples included in esp32-adf sdk for single file mp3 playing from the sd card using an audio pipeline, it works well.
But I would like to know how is the correct sequence to jump from file to file if you have many files on sd card during play not only a single file as the example.
I cant find information enough in the documentation to know a step procedure to avoid hangs and errors to manipulate the pipeline or the audio elements involved when I try to switch from file to file without doing a reset.
If someone knows can give some advice or a basic diagram for the right procedure?
Thanks
Basic example for mp3 from sd card
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Basic example for mp3 from sd card
Hi escalator,escalator wrote:I would like to know how is the correct sequence to jump from file to file if you have many files on sd card during play not only a single file as the example.
Check periph_console example that shows how to jump from file to file.
Re: Basic example for mp3 from sd card
Hi krzychb,
Big thanks for the advice.
But maybe I did not express myself correctly. I understand how to select between files inside the SD but my question is more about the right steps needed to reset the pipeline between file switching (pipeline run, stop, resume, init , terminate,etc...)or to automatically play the next file when one is finished. I did not see any example of pipeline management between file playing except to destroy all the elements in the pipeline and restart from scratch.
In the test that I am trying my audio_pipeline is: (sdcard)->fatfs_stream_reader -> mp3_decoder -> i2s_stream_writer->(DAC)
So when initial file finishes playing I want to switch to another file and keep playing, I know how to change the "uri" for the fatfs_stream_reader to point to the next file but I have no idea about how to reset the audio elements involved or the audio_pipeline in the proper order to keep playing without interruptions or resets.
Big thanks for the advice.
But maybe I did not express myself correctly. I understand how to select between files inside the SD but my question is more about the right steps needed to reset the pipeline between file switching (pipeline run, stop, resume, init , terminate,etc...)or to automatically play the next file when one is finished. I did not see any example of pipeline management between file playing except to destroy all the elements in the pipeline and restart from scratch.
In the test that I am trying my audio_pipeline is: (sdcard)->fatfs_stream_reader -> mp3_decoder -> i2s_stream_writer->(DAC)
So when initial file finishes playing I want to switch to another file and keep playing, I know how to change the "uri" for the fatfs_stream_reader to point to the next file but I have no idea about how to reset the audio elements involved or the audio_pipeline in the proper order to keep playing without interruptions or resets.
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Basic example for mp3 from sd card
Hi @escalator,escalator wrote:my question is more about the right steps needed to reset the pipeline between file switching (pipeline run, stop, resume, init , terminate,etc...)or to automatically play the next file when one is finished.
I was also looking for an application that would illustrate such steps . Please check pipeline_sdcard_mp3_control example that was merged today and hopefully answers your questions.
Re: Basic example for mp3 from sd card
Hi @krzychb:
Thanks for your info, you are right, that example includes the answer to my question.
Thanks for your info, you are right, that example includes the answer to my question.
Who is online
Users browsing this forum: No registered users and 7 guests