summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2021-09-30 07:41:00 -0700
committerAndreas Kling <kling@serenityos.org>2021-10-25 23:37:18 +0200
commit314b8a374ba82152bb092d9c6ff0c2b5d5c21005 (patch)
treedb2fb87f22b0bcf907371dd119d8ef5d2891c041 /Documentation
parent0812965f505e2d7100a054ddef721c62f37444a7 (diff)
downloadserenity-314b8a374ba82152bb092d9c6ff0c2b5d5c21005.zip
SoundPlayer: Implement playlist shuffle mode
The shuffling algorithm uses a naïve bloom filter to provide random uniformity, avoiding items that were recently played. With 32 bits, double hashing, and an error rate of ~10%, this bloom filter should be able to hold around ~16 keys, which should be sufficient to give the illusion of fairness to the shuffling algorithm. This avoids having to shuffle the playlist itself (user might have spent quite a bit of time to sort them, so it's not a good idea to mess with it), or having to create a proxy model that shuffles (that could potentially use quite a bit of memory).
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions