Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  A Better Random Play Routine
« previous next »
  • Print
Pages: 1 [2]

Author Topic: A Better Random Play Routine  (Read 9094 times)

Offline LinusN

  • Member
  • *
  • Posts: 1903
Re: A Better Random Play Routine
« Reply #15 on: July 31, 2008, 04:07:04 AM »
Quote
It was the latter here.  It seemed like after I had heard several songs by a certain artist I would be more likely to hear another song by that artist than another artist that I had not heard yet.  I played this game a few times: "Ive been hearing a lot of Led Zeppelin recently, lets see if I hear another Led Zeppelin before something by Tom Petty" (for example, since I have at least as many tracks by Tom Petty) and it seemed like it came true more often than not.
I must admit that I have had that exact same feeling myself numerous times. The thing is that a random shuffle doesn't mean that the files are evenly distributed in one specific shuffle...
Logged
Archos Jukebox 6000, Recorder, FM Recorder/iAudio X5/iriver H1x0, H3x0/Toshiba Gigabeat F20/iPod G5, G5.5

Offline pondlife

  • Developer
  • Member
  • *
  • Posts: 248
Re: A Better Random Play Routine
« Reply #16 on: July 31, 2008, 07:43:23 AM »
Do the other random selections (database <Random> and Random Next Directory plugin) use the same code?  Or could they be less random?

pondlife
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: A Better Random Play Routine
« Reply #17 on: July 31, 2008, 07:49:54 AM »
random next dir just uses rand()%count so yes.. it probably sucks also :p
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline keuleJ

  • Member
  • *
  • Posts: 93
Re: A Better Random Play Routine
« Reply #18 on: August 13, 2008, 08:33:43 AM »
Just out of interest:
Why do you use rand()%count and not something like rand()*count?
Doesnt rand() return someting between 0 and 1? Or is this a problem of the (not existing) floating point numbers?
Logged

Offline LinusN

  • Member
  • *
  • Posts: 1903
Re: A Better Random Play Routine
« Reply #19 on: August 13, 2008, 09:16:21 AM »
Quote from: keuleJ on August 13, 2008, 08:33:43 AM
Just out of interest:
Why do you use rand()%count and not something like rand()*count?
Doesnt rand() return someting between 0 and 1? Or is this a problem of the (not existing) floating point numbers?
The rand() function returns an integer number between 0 and RAND_MAX. It is a standard C function. And yes, floating point is out of the question.
Logged
Archos Jukebox 6000, Recorder, FM Recorder/iAudio X5/iriver H1x0, H3x0/Toshiba Gigabeat F20/iPod G5, G5.5

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  A Better Random Play Routine
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.091 seconds with 22 queries.