aboutsummaryrefslogtreecommitdiffstats
path: root/bs/pkginfo.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-01 18:03:34 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-01 18:03:34 -0700
commitcf1f842a4c8f760c4c6a41f0dadc6c173a182d4f (patch)
tree901cd1238a1cccb035e54d0e75ff1af520c4c413 /bs/pkginfo.sh
parent36984e9e8c7ccb33f43a9f096e848d28e532dc6e (diff)
downloadmpd-cf1f842a4c8f760c4c6a41f0dadc6c173a182d4f.tar.gz
mpd-cf1f842a4c8f760c4c6a41f0dadc6c173a182d4f.tar.xz
mpd-cf1f842a4c8f760c4c6a41f0dadc6c173a182d4f.zip
playlist: fix shuffle/random distribution
Previously we were using a naive randomization algorithm that could shuffle already shuffled songs. Now we attempt to correctly[1] implement the Fisher-Yates shuffle. [1] Note: I absolutely suck at basic arithmetic, so there could be off-by-one errors in here, too. I've added assertions in swapSongs and swapOrder functions to more quickly detect them.
Diffstat (limited to 'bs/pkginfo.sh')
0 files changed, 0 insertions, 0 deletions