[ http://dev.sourcefabric.org/browse/LS-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17265#action_17265 ]
David Baelde commented on LS-542: --------------------------------- Your experiment is quite convincing. I simplified it it a little bit (only works with a directory containing files with different track numbers, such as a cleanly ripped album): $ cat random.liq set("log.file",false) source = playlist(id="src","~/media/audio/albums/The Bad Plus - Prog") output.dummy(fallible=true, on_track(fun(m)-> begin print("#{m['tracknumber']}") shutdown() end,source)) $ cat random.pl #!/usr/bin/perl for (0..100) { $count{int(`./src/liquidsoap random.liq`)}++ ; } for (sort { $a <=> $b } (keys %count)) { print "$_ $count{$_}\n" ; } The liq script prints the first tracknumber and exits, the perl script runs it a hundred times and reports how many times each track number was obtained. A typical output is: 1 24 2 3 3 12 4 11 5 11 6 6 7 11 8 2 9 11 10 10 Interesting problem... > randomize for playlists is not so random > ---------------------------------------- > > Key: LS-542 > URL: http://dev.sourcefabric.org/browse/LS-542 > Project: Liquidsoap > Issue Type: Bug > Reporter: Samuel Mimram > Priority: Major > > I use "playlist(directory)" for testing, and by default the mode is > randomize. The starting song is "random", but I got many times the same song > as first song, too many times for me to believe in randomness (the directory > is my mp3 library which is fairly large...). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://dev.sourcefabric.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Savonet-devl mailing list Savonet-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-devl