Makerfabs / Project_MakePython_Audio_Music

20 stars 7 forks source link

Problem with subdirectories #1

Open gamingoutbrexit opened 3 years ago

gamingoutbrexit commented 3 years ago

I have the Music Player project working fine with ten mp3s in the root of the SD card. But I want to allow the user to choose from several directories. To test, I created a directory called REG and moved the ten mp3s in there and changed line 104 of music_player.ino from: file_num = get_music_list(SD, "/", 0, file_list); to file_num = get_music_list(SD, "/REG", 0, file_list); When I upload and run, the first song plays fine, but then it panics and reboots.

The first song playing shows the following in the serial monitor: **start a new sound**** info stream ready info syncword found at pos 0 info Channels=2 info SampleRate=44100 info BitsPerSample=16 info BitRate=320000

But then: info framesize is 0, start decoding again Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4008ceb4 PS : 0x00060031 A0 : 0x8008b64a A1 : 0x3ffbd6e0
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x3ffc4c78 A5 : 0x00000001
A6 : 0x00060120 A7 : 0x00000000 A8 : 0x8008cd85 A9 : 0x3ffbd6b0
A10 : 0x3ffbeec8 A11 : 0x000000fe A12 : 0x00000001 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000030 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

Backtrace: 0x4008ceb4:0x3ffbd6e0 0x4008b647:0x3ffbd700 0x4008dd91:0x3ffbd720 0x40087a7e:0x3ffbd730 0x40146bc3:0x3ffbd7f0 0x400f42a3:0x3ffbd810 0x4008cd4d:0x3ffbd830 0x4008b559:0x3ffbd850

Rebooting...

This is repeatable with different mp3 files. Always, the first one plays fine and then reboot.

Is there somewhere else that I need to specify that I am not using the root directory?