Page 1 of 1

How to manage the playback of multiple MP3 files ?

Posted: Tue Oct 22, 2019 8:46 am
by vgonet
Hello,

I want to do the following steps.

1. The playback of a MP3 file is requested by the user.
2. The MP3 file is playing.
3. During the playback of the MP3 file, a second playback is requested by the user.
4. The playback of the first MP3 file shall be stopped and the second shall be played.

How can I do that ?

My code is based on the example: esp-adf/examples/advanced_examples/dlna.

Best regards.

Re: How to manage the playback of multiple MP3 files ?

Posted: Fri Oct 25, 2019 9:34 am
by jason.mao
Hi Vgonet,

Please refer to https://github.com/espressif/esp-adf/bl ... _wrapper.c.

Code: Select all

esp_player_music_play();// play first mp3 file
esp_player_music_pause();// stop and store first mp3 file, try to play second mp3 file
esp_player_tone_play();// play new mp3 file
esp_player_music_resume();// recover play first mp3 file