Rockbox

  • Status Closed
  • Percent Complete
    0%
  • Task Type Bugs
  • Category Playlists
  • Assigned To No-one
  • Operating System
  • Severity Medium
  • Priority Low
  • Reported Version Release 1.3
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by emarkay - 2002-09-17
Last edited by kobler - 2003-10-01

FS#257 - Random regularly repeats, request repair

Have Archos JB Studio 20 Player (it's out in car, will
get model # after I get dressed ) (!) and Rockbox 1.3
(from less than a week ago), Unit had Arcos firmware
5.3 updated to 5.7 , and now reports 5.3 and then
Rockbox 1.3

Please explain operation of random/shuffle play.

I have 15 directories of about 200 songs each, no
playlists, and the resume feature is "ON" (this speeds
start up by not having to select directory before first
play)

In following example, the song numbers for reference only)

Power up
Song 1,6,3,5,9,2 play on trip away.
Power down:
Power up:
On trip home, song 2,13,75,22,44 play.
Poower down
Power up:
next time I get song 44,66, 3, 5, 9,

Note the same block of last songs from earlier in SAME
order.

Is the random/shuffle storing some info that needs to
be reinitialized each time unit is powered on? -
re-randomized?

Is there a file or directory quantity limit issue?

All file names are "artist - title.mp3" and all
directories begin with a 2 second "ding" file named
"001.mp3" to start as the first song so any next
selection is (supposedly) random. (This is in case the
resume is turned "OFF")

BTW, Excellent work! Thank you!

MRK

Closed by  zagor
2002-09-24 14:49
Reason for closing:  Works For Me

S/N label obscured by my Velcro attachment, but data from
box is:
PN / STUDIO 20
SN 0136011xx

Length of songs in fiels varies from 470K (a short one) to
20.5M (a long one). Hope this helps!

Project Manager
zagor commented on 2002-09-17 22:10

This sounds *very* strange.

Shuffle works by taking the file list and shuffling the entries.
Then it plays the list from first to last entry. There should be no
way to accidentally play the same entry twice.

Resume also stores the seed used to shuffle the playlist, so it
will be shuffled in the same order on next boot.

Are the track numbers your written down, actual numbers. Or
are they just as you recall it? (Pardon me for sounding
sceptical, but this is a very unexpected bug.)

Anonymous Submitter commented on 2002-09-18 01:47

It's me - didn't log in….

Actually this has happened TWICE on different times -
there's a 20 minute drive I take to the university and
always have the Rockbox on.

The song numbers are for example only, but I know I heard
the same song AND THEN THE SAME NEXT SONG on two different
road trip last week.

What if it took the 200 songs in my directory "02" and
"shuffled the entries, then played the list from first to
last entry" in the same manner. If there is no random
randoming, the same operand could reproduce the same
pattern, correct??? - like getting snake eyes on the dice
more than once .

"Resume also stores the seed used to shuffle the playlist,
so it will be shuffled in the same order on next boot."

So if resume and shuffle is on, and you hit the same shuffle
pattern twice, it will resume using the pre-existing shuffle
pattern?

I guess I am sounding confused, but I thought a shufle would
scramble the directory sort completely randomly, and do this
EACH time the unit was powered up.

What is the suffle entry program - is it truly random?

try it - get a Jukebox, put in 200 songs in a directory,
play 5 to 10 songs , power it down and repeat a few times.
See if you get the same thing.

MRK

Are you talking about listening twice to the same sequence of
songs after some other songs in between or are you talking
about hearing the same song twice in a row?

If it's the sequence, then it could be that you have listened
to the whole playlist and it starts all over again at the
beginning with still the same shuffle order as before.

This "repeat all" feature cannot be turned off at the moment,
and is used for every playlist and directory listening,
shuffled or not. To get a new shuffle order just stop the
playlist and start it again from the browser.

Anonymous Submitter commented on 2002-09-18 14:30

Remo,

Without naming song titles (I can't recall which ones
anyway) After a few random songs, a song call it "mickey
sings") is followed by another song ("donald sings") .
sometime later, after powering down the same song ("mickey
sings") is again followed by the same next song ("donald
sings") . I have been manually advancing up to this point
so I don't know if a THIRD Identical song will appear.

I can live with this, but it's strange.

No there are NO playlists. Just about 15 directories of
about 200 songs each, randomly placed there.

Only about 10 songs are listened to at any time, so in
theory I should get 20 different sets before repeats.

Also I am powering off each timne so I would think that it
would re-randomize each time? Is this the same as " To get
a new shuffle order just stop the playlist and start it
again from the browser."?

MRK

Project Manager

The whole idea with resume is that we want to resume at the exact point in
the playlist that we were when we shut the unit off. That also means that
the playlist is shuffled in exactly the same way. This is a
feature.

About the resume, on the player models we can't always
store the exact resume point since that would require too much writing to
disk, which would drain the batteries in no time. Instead, we store the
resume point when the disk spins up to read more MP3 data. If you turn off
the unit right before that point, you will resume from where MP3 data last
was loaded, and that might even be the previous song.
If you want the
unit to resume exactly where you left off, pause the player before you turn
it off. Then the resume point will be flushed to disk. Be sure that you wait for
the disk access to finish before you turn the unit off.

Anonymous Submitter commented on 2002-09-23 03:34

"The whole idea with resume is that we want to resume at the
exact point in the playlist that we were when we shut the
unit off. That also means that the playlist is shuffled in
exactly the same way. This is a feature."

Can we get a new shuffle EVERY time it's powered up??
Resume to existing SONG, but get new shuffle order ater that
song?

Pretty Please? :)

MRK

Project Manager

Is it possible for you to explain why you want to resume with the same
song, but not the same random seed?

/Linus

Project Manager
zagor commented on 2002-09-23 09:27

Question: Did you pause playback before shutting off the unit?

Anonymous Submitter commented on 2002-09-23 15:44

I don't want to be a pain, you have done excellent work.
Possibly my application is unique to most users.

Zagor, No pause is selected..

The resume feature starts unit where last powered off, at
the same point in the song. This I know.

It seems beyond chance that the sort algorithm selects the
same pattern each time it is powered up. This I assume, but
it HAS happened…

BUT, if resume is ON, no further sorting (randomising) of
song order occurs. This I see from posts here.

But SOMEHOW, the powering OFF and ON with resume ON, songs
ARE being repeated.

NOTE: This was something I noted with the ARCHOS firmware,
also! It's NOT Rockbox's fault, but I was hoping there
could be a way around this.

Thee are more than 2300 songs , 55 albums plus my backup
text files in about 25 directories on the Archos unit. With
about 200 songs in each directory, it is strange to hear
the same song play in the same day, but it is happening!

Hey, is it possible to make it so once a song is played, it
won't repeat untill that directory is changed?????

Maybe put a flag on that song (the archive bit maybe) that
is prevents it from playing again, which is then cleared
when the directory is de-selected ?

Thanks!

MRK

Project Manager

Ok, since you haven't pressed PAUSE before turning off the unit, there is
a possibility that you will hear the previous song again when you turn it on
again. You are supposed to pause before you shut off.

The
resume function is designed so that it uses the same seed when
resuming, thus the random algorithm will produce the same exact
sequence as before the unit is turned off. This is intentional.

We
don't need to put a flag on songs to prevent them from being played again.
the shuffle algorithm guarantees that the same song won't be played
again until all other songs have been played.

Please try to
reproduce the bug in a controlled manner, so we can fix
this.

/Linus

With a large playlist (> 7000 tracks) I'll got the same
track again after a few hours. If I understand the sw
(randomise_playlist()) correctly, this should not happen,
before all tracks have been played. I didn't stop the
recorder between the two occurances of the same track. Maybe
I paused. But nothing else.
Another thing is, that the randomizing seems to prefer some
songs, which are played almost every day. When I got it
right, srand(current_tick) is done, so I do not understand
how this might happen (The RTC is working fine).
If someone has a hint where the best place to add code for
building a list of played files is, I would try to log it.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing