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

mp3 player problem

Open Charlesguo11 opened this issue 1 year ago • 4 comments

Hi! I have an esp-box, I used two thread on this chip. And I copied the function play_mp3() in my second thread.Then I used a flag to trigger it. However, every time I trigger it,it would stuck like this:

I (39665) main: start to decode /spiffs/mp3/warning.mp3 I (39679) main: audio info: sr=48000, bit=16, ch=1

I think the problem might be this line: "i2s_channel_t channel = (nChans == 1) ? I2S_CHANNEL_MONO : I2S_CHANNEL_STEREO;" How can I solve this question?Thanks!

Charlesguo11 avatar Jul 07 '22 06:07 Charlesguo11

I think the problem is this line: "i2s_set_clk(I2S_NUM_0, sample_rate, bits_cfg, channel);"

Charlesguo11 avatar Jul 08 '22 03:07 Charlesguo11

Hi @Charlesguo11, let me push some code tonight. I’ve been working on a rewrite of the audio player and it may be that the issue is solved due to the rewrite. A number of issues with mp3 playback were resolved.

chmorgan avatar Jul 13 '22 23:07 chmorgan

@chmorgan Hi,it would be great if the problems were solved. But,when can i have the new version of it? Thanks a lot!

Charlesguo11 avatar Jul 17 '22 10:07 Charlesguo11

@Charlesguo11 https://github.com/chmorgan/esp-box/tree/audio_playlist_component

is the work in progress branch. There is still an issue with mp3-demo related to playback switching on the ui side, something gets out of sync and the UI isn't in the correct state. But the audio_player component itself, and the playlist components should be good to go.

Let me know what you think and how it works.

chmorgan avatar Jul 17 '22 19:07 chmorgan

Updated mp3 playback player has been merged with a number of fixes for differing sample rates and proper handling of the final bytes to decode.

Can an admin close this one for that and lack of activity?

chmorgan avatar Mar 05 '23 18:03 chmorgan