Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24137 - A patch to improve xmms random generator
Summary: A patch to improve xmms random generator
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Sound Team
URL: http://bugs.xmms.org/show_bug.cgi?id=21
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-08 19:37 UTC by Lesley van Zijl
Modified: 2005-02-23 11:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xmms-1.2.8-random.patch (xmms-1.2.8-random.patch,1012 bytes, patch)
2003-09-05 11:35 UTC, Bret Towe
Details | Diff
updated patch (xmms-1.2.8-random_v2.patch,1.26 KB, patch)
2003-09-14 00:50 UTC, Bret Towe
Details | Diff
updated randomize patch...solarisisms (xmms-1.2.10-random.patch,687 bytes, patch)
2005-02-23 10:19 UTC, devsk
Details | Diff
updated updated randomize patch...solarisisms (xmms-1.2.10-random.patch,1.22 KB, patch)
2005-02-23 10:54 UTC, devsk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lesley van Zijl 2003-07-08 19:37:41 UTC
I (and I know that allot of people are with me on this one) am annoyed by the
way that xmms uses random for playing tracks in 'random' mode. On the site that
the link points to you can read about how it does it. 

http://bugs.xmms.org/show_bug.cgi?id=21

I guess it's to much to ask to find a way that it regenerates the 'virtuel
randomized list' everytime you change a song. But on the bottom of the page
there is a patch to improve the xmms random a bit (applied the patch manually
but didnt really test it).

so maybe this patch could be in the standard patch set for xmms.
and hopefully someone says "YES! you are right" and can fix the main problem :)

Reproducible: Always
Steps to Reproduce:
1. use xmms :)
Comment 1 Bret Towe 2003-09-05 11:35:48 UTC
Created attachment 17126 [details, diff]
xmms-1.2.8-random.patch

here is a copy of that patch that applys cleanly against xmms-1.2.8
Comment 2 Bret Towe 2003-09-11 19:36:41 UTC
ive been running this patch since slightly before i submited it here
for 1.2.8 and it has helped *ALOT*
Comment 3 Bret Towe 2003-09-14 00:50:05 UTC
Created attachment 17680 [details, diff]
updated patch

didnt apply any more due to another patch being a pain

one section had changed alot updated the rand it was using
not sure if math is right tho
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-09-14 15:47:35 UTC
thanks magnade :)
Comment 5 devsk 2005-02-23 09:26:08 UTC
OK, I want to wake this sleeping horse from its slumber. This patch make xmms core dump on solaris because random() returns a number between 0  & 2**31-1 while on linux it returns a number between 0 & RAND_MAX.

Can someone please reopen this bug? if it helps save me some time...:)
Comment 6 devsk 2005-02-23 09:41:11 UTC
just a follow up, the RAND_MAX on linux is 2**31-1 while on solaris it is 32767. I will post an updated patch.
Comment 7 devsk 2005-02-23 10:19:59 UTC
Created attachment 51964 [details, diff]
updated randomize patch...solarisisms
Comment 8 devsk 2005-02-23 10:43:26 UTC
Comment on attachment 51964 [details, diff]
updated randomize patch...solarisisms

there is more RAND_MAX in that file
Comment 9 devsk 2005-02-23 10:54:21 UTC
Created attachment 51972 [details, diff]
updated updated randomize patch...solarisisms