View Single Post
Old 01-16-2015, 10:31 PM   #25
Dadhawk
Senior Member
 
Dadhawk's Avatar
 
Join Date: Feb 2012
Drives: '13 FR-S (#3 of 1st 86)
Location: Powder Springs, GA
Posts: 20,109
Thanks: 39,679
Thanked 25,444 Times in 11,603 Posts
Mentioned: 187 Post(s)
Tagged: 4 Thread(s)
Quote:
Originally Posted by Target70 View Post
I don't see how it is so hard to get right...P


It's not difficult, if they bother to do it correct. You take the alphabetical song list, number them 1 to x, then shuffle the entire list with no repeats. (technically you put the pointers to the songs in an array and shuffle the array). What you are basically doing is creating an on the fly playlist.


Some devices do a true random, basically picking a different random song after each one plays. and that is where you get into trouble for two reasons. That means you are tracking what's played so you get repeats. Also, on a computer there really is no such thing as a true "random" number. There are algorithms that approximate it based on time or some other system function it can attempt to run some formula against but a computer can't just randomly reach into a hat and pull out a song to play.
__________________
Olivia 05/03/2012 - 01/06/2024. 231,146 glorious miles.

Visit my Owner's Journal where I wax philosophic on all things FR-S
Post your 86 or see others in front of a(n) (in)famous landmark.
What fits in your 86? Show us the "Junk In Your Trunk".
Dadhawk is offline   Reply With Quote