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
Search



Donate

Rockbox Technical Forums


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

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Random Folder Advance producing improbable results
« previous next »
  • Print
Pages: [1]

Author Topic: Random Folder Advance producing improbable results  (Read 816 times)

Offline Tor

  • Member
  • *
  • Posts: 9
Random Folder Advance producing improbable results
« on: June 09, 2015, 01:56:41 AM »
Well, I've suspected that something about seed selection is less than random before, and often had the sense that what turns up most frequently changes after changing the folder list, but now I've got a few numbers to look at.

Procedure:  Added new album in individual folders (used script to make track folders, copy tracks to folders, and append folder paths to FAL.txt.  Out of 22 occasions when RFA has selected one of the 10 tracks, only 7 tracks have shown up.  All seven first were played by the 11th selection.  Thus, the last 11 selections have all been from the 7 already played tracks.  The probability of this is (if I'm not much mistaken) 7/10 per selection multiplied by itself once per selection for a net probability of (7/10)^11=.01977... or not quite 2%.

I tested that the missing tracks play correctly when manually selected because I once hand a song that wasn't showing up eventually be proved to be caused by an undetermined error in the file which I solved by recopying from source.

In addition, though I'm not sure where my records have gone right now, I twice recorded 25 occurrences of 5 folders and found that individual folders showed up from 2-8 times (IIRC - quite sure for first round, less certain for second) within the 25 "random" selections.

As I understand it/have observed, RFA works by taking the current millisecond tick when a new folder is called for and using that as the random seed to select the next folder.  When letting the player work on its own this happens in the last few seconds of the playing song.  Is there possibly something in the code for when RFA takes the next seed, perhaps dependent on codec, that might limit the effective randomness, especially as the length of the list grows?  Then again, codec dependent  effects might not be a likely explanation because the first effect described here happened with a substantial portion of selection on request by manual track change past last track in folder.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Random Folder Advance producing improbable results
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.045 seconds with 15 queries.