FS#12688 - "Queue" sometimes results in songs being placed before instead of after the currently playing song.
I have a Sansa e260 player and currently Rockbox 3.11.2 running on it.
I got a shuffled playlist with all of my music in it (added to the playlist using the insert function and reshuffled afterwards). When I want to listen to one or more specific songs, I enqueue them with the queue function (in play mode select song, album etc. from database -> context menu -> Current playlist -> Queue).
This works fine in most cases but when there had already been a queue that ended the song before, the song that I want to enqueue is placed before the currently playing song (which is the first song not any more part of the former queue) instead of after it.
If I use the feature "Queue next" the song, album or whatever is correctly placed after the currently playing song. After having used "Queue next" once, other songs enqueued with the "Queue" command may be also placed correctly at the end of the new queue. I believe to remember some strange behavior though when in that case the song was also incorrectly placed as described above.
I tried mp3 and ogg files and the behavior was the same regardless of which file format was used. It also doesn't matter if the song is played from the player's memory or from micro SD card.
As soon as the second song after the queue is playing, enqueued content is correctly placed after the currently playing song again.
I have experienced this behavior for a long time now and with different Rockbox builds on my player.
To reproduce the behavior:
1. Have a reshuffled playlist (created using "Insert" command, then selecting "Playlist" -> "Reshuffle" from the wps context menu) with some songs in it
2. Listen to one of these songs which is not the first or last one in the playlist
3. Enqueue a song from your database via the context menu (This song should be placed directly after the currently playing one)
4. Play the enqueued song (or a part of it)
5. Play the next song in playlist
6. Now enqueue another song (This song should now be placed directly before the currently playing song in the playlist)
I have hardly any programming experience at all but it seems to me that somehow there exists some sort of marker that indicates the end of a queue and that this marker is not erased immediately after a queue ends but "one song too late"?
This task depends upon