Remix.run Logo
▲ WalterBright 3 hours ago

Pretty much every USB music player has the same faults:

1. shuffle play does not work

2. crashes if there are more than N songs

3. does not find songs in subdirectories

All of these are trivial to fix. I do not understand the programmers who make the firmware.

▲0gs 3 hours ago | parent [-]

wow hacker news wins again. i am going to fix these in my music player. i think 2 & 3 are chill already... and i can totally fix 1. thanks!

▲WalterBright an hour ago | parent [-]

To implement shuffle play, it is not necessary to actually shuffle filenames in memory. Just generate a random number modulo the number of files, and then play that file. That way your program can shuffle play any number of files, no worries about running out of memory.

By the way, the Roku box has a "media player" app in it by default, and it cannot shuffle play more than a handful of files. Completely useless.

▲WalterBright an hour ago | parent | next [-]

BTW, Windows Media Player is the winner, as it "just works". Just point it at the root directory of the music files, turn on shuffle play, and it works, and doesn't crash.

▲moron4hire an hour ago | parent | prev [-]

That's random play, not shuffle play. Random play can repeat songs before all songs are played. Shuffle play will play all songs exactly once before any repeats occur. Random play "puts the card back into the deck" before dealing the next one.