Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD File playback failed #46

Closed
tsctrl opened this issue May 14, 2022 · 4 comments
Closed

SD File playback failed #46

tsctrl opened this issue May 14, 2022 · 4 comments

Comments

@tsctrl
Copy link

tsctrl commented May 14, 2022

hi @Edzelf ,

D: SD okay, start scan
D: Locate mp3 files on SD, may take a while...
D: DIR : mp3_folder
[ 19936][E][vfs_api.cpp:29] open(): mp3_folder does not start with /
D: Failed to open directory
D: Space 179124
D: 0 tracks on SD
D: Radiofuncs cmd is 1

i am getting error during sd directory scan. could not understand how the file and folder mapping work to fix it myself.
sd call will only read file name and first level directory or the sub directory per scan and not able to play playback of file stored without full path so the file path need to be stored in the mp3spec variable. so far my test the mp3spec files only stored the file name and not full path.

in this function: getsdtracks(const char * dirname, uint8_t levels) and addToFileList( file.name()))
file.name() only return file name and not path. and during scan the directory are not being map.
wondering how it was done to recall back directory of the sub mp3 files.

Thanks,

@tsctrl
Copy link
Author

tsctrl commented May 14, 2022

i have to replace this line to use path, it is working but i not sure the impact on the filespec variable:

if ( ! addToFileList ( file.name() ) ) // Add file to the list

addToFileList(file.path()))

@tsctrl
Copy link
Author

tsctrl commented May 15, 2022

@Edzelf few issue need to be address:

  1. my playback from sd is really choppy. (i am looking on this issue. probably due to sharing bus)
  2. sd will conflict with vs during startup. require sd card to be taken out during boot and insetting the sd after vs test completed.
  3. sd only detected during start. inserting new sd need system reboots.

@tsctrl
Copy link
Author

tsctrl commented May 15, 2022

created pr #47
file.path() does not compatible with existing pio core
but did not fix the choppy issue.

@tsctrl
Copy link
Author

tsctrl commented May 15, 2022

the choppy issue was fixed, is because of the delay added on my end. closing this issue.

@tsctrl tsctrl closed this as completed May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant