aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 00:08:40 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 00:08:40 +0100
commit3a1de741bbb8cf412a72d53793d205a139c101ac (patch)
tree434675ff438787592d7f9abe14496bf0dcbb1906 /src/queue.h
parentfb2ef107d1b43d5ba34918059113ec68293d379e (diff)
downloadmpd-3a1de741bbb8cf412a72d53793d205a139c101ac.tar.gz
mpd-3a1de741bbb8cf412a72d53793d205a139c101ac.tar.xz
mpd-3a1de741bbb8cf412a72d53793d205a139c101ac.zip
queue: added queue_shuffle_order()
The function shuffles the virtual order of songs, but does not move them physically. This is used in random mode. The new function replaces playlist.c's randomizeOrder() function, which was aware of playlist.current and playlist.queued. The latter is always -1 anyway, and the former as preserved by the caller, by converting playlist.current to a position, and then back to an order number.
Diffstat (limited to '')
-rw-r--r--src/queue.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/queue.h b/src/queue.h
index e27a470d9..b355a6a3e 100644
--- a/src/queue.h
+++ b/src/queue.h
@@ -313,6 +313,13 @@ queue_restore_order(struct queue *queue)
}
/**
+ * Shuffles the virtual order of songs, but does not move them
+ * physically. This is used in random mode.
+ */
+void
+queue_shuffle_order(struct queue *queue);
+
+/**
* Shuffles a (position) range in the queue. The songs are physically
* shuffled, not by using the "order" mapping.
*/