Shop OBEX P1 Docs P2 Docs Learn Events
Opening multipe files on SD Card? — Parallax Forums

Opening multipe files on SD Card?

teddypteddyp Posts: 14
edited 2010-03-24 19:10 in Propeller 1
Hi all,
I'm trying to read an MP3 off an SD card to play with a VS1033 chip and also log GPS data at the same time. I can play MP3's and I can create/log GPS data, but I can't do them simultaneously currently. I looked into fsrw and do not believe this will do what I need it too. I have been searching everywhere for an answer to this and I have been told to look into DOSonChip, but am wondering if there's a way to do it in software first. Sorry if this is already listed somewhere, my forum searches are producing nothing and my google searches are pointing to all kinds of things. Thanks in advance for any help.

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-24 19:10
    The proplem is the overhead you have for directory, cluster-table access and that you have to store this information for each file you want to access if you want to be able to switch from file to file. Writing the GPS data also means to find empty clusters and reserving them, which might lead to lags in playback if the buffer is not big enough.

    I'd do it a different way. Having a file which is big enough to store the log-data in continuous clusters on the table allows you to write data to the SD card without that overhead. You can have a look at this thread:
    http://forums.parallax.com/showthread.php?p=856170

    It's a addon for FSRW but it works in parallel. You can use what I called vMem for logging the GPS-data and use the usual FSRW functions for reading the MP3-files. You only have to open the MP3 file. The file for logging is accessed by sector addresses directly. You only have to take care that the address you write to does not get bigger as the size of the swap.sys.

    Hope that helps.
Sign In or Register to comment.