Bug#44807: Hayes randomize mode unusable

Eray Ozkural erayo at cs.bilkent.edu.tr
Sun Jul 7 11:50:14 BST 2002


On Sunday 07 July 2002 03:51, Neil Stevens wrote:
>
> Heh.. you just rewrote exactly my idea that I plan to implement, almost
> word for word how I described it. :-)
>
> The biggest reason Hayes hasn't had it done already is that Hayes' position
> in the release was uncertain.. I was waiting on it moving to nonbeta or
> extragear or addons or something.

Carsten's solution sounds similar to the one I thought for dub, but we still 
can't get uniform distribution :) Some songs aren't gonna be played. 

There are usually two problems with shuffle functions in playlist codes:

1) Some songs are repeatedly played, some aren't played
2) Songs are played in the same order like a crappy radio station

The mp3 directory is a tree with a number of songs at each node. Knowing that, 
we can make a perfect shuffling of all songs without any of these problems 
since we can give each song a number. This might be a better sol'n *and* to 
construct the shuffle table you don't need to read the file info for each 
song. You could simply assume every file is a media file, and then those 
unplayable files will be skipped anyway. This does away with 1. To address 2 
you can give the user a choice to re-shuffle his index since we can handle 
shuffling by creating an array [1..n] and then running a random shuffle 
algorithm on it. There will be a model of the directory hierarchy in memory 
that maps index -> file.

I'll try to implement this for dub and you can take a peek ;)

See ya,

-- 
Eray Ozkural <erayo at bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara
www: http://www.cs.bilkent.edu.tr/~erayo
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C


(Complete bug history is available at http://bugs.kde.org/db/44/44807.html)



More information about the kde-multimedia mailing list