2

I have a digital music changer that simulates a cd changer for my car radio. It can read mp3 files from an SD card, however the order of playback is determined "by time the file was copied to the SD card".

I made the following observations:

  • Copying multiple files at once (tested only via drag & drop) leads to almost random playback order
  • copying file by file by drag & drop leads to a random playback order that (not verified) seems to be equal to to playing order when copying all files at once.
  • copying file by file using the clipboard shortcuts leads to correct playback order.

I also wrote a simple C# program to overwrite the create / accessed / last write time properties of each file in alphabetical order, however it had no effect on playback order. I changed it to copy each file one by one, which didn't help either. Using a program called "Mp3DirSorter" also didn't help.

My current guess is that the device reads files from the FAT32 file table. If this is correct I wonder:

  • Why does drag & drop and Copy-Paste lead do different results?
  • How can the files be rearranged in the Fat File Table? (possible duplicate question)

Addition: it might be worth noting that the SD card may not have been formatted between each test.

1 Answer 1

3

Your player seems to pick tracks in order in which files occur in a directory. This order depends on many factors, and since removed files leave holes in the directory which are later filled by newly added files, it may be next to impossible to predict.

So, if you need to guarantee the order:

  1. Format your SD card to clean up all directory entries
  2. Copy files one by one in the required order

Drag and drop operation is implementation-dependent. On my Windows XP machine it seems to depend on the file you click on while dragging: if I select 10 files named file0 ... file9 and drag them while clicking on file5, the resulting order will be file5 ... file9 file0 ... file4. So if you want to use drag and drop, try to click on the first file while dragging.

Tip: the windows dir command lists files in order they occur in a directory. So if your music plays songs in the same order as dir output, this answer is relevant; otherwise something else plays a role in the way it picks songs.

2
  • Bingo... this player stupidly relies on the order the names appear in the directory, which nobody is supposed to care about. They do this because it would take some amount of work on their part to sort the names say, alphabetically, so they take the easy way out and just play them in the order they are listed in the directory.
    – psusi
    Commented Apr 3, 2015 at 22:43
  • 1
    indeed, I also found this article very interesting, as it explains pretty much exactly what's going on: codeproject.com/Articles/95721/FAT-Sorter
    – Xaser
    Commented Apr 4, 2015 at 8:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .