From 3a1de741bbb8cf412a72d53793d205a139c101ac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 23 Jan 2009 00:08:40 +0100 Subject: 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. --- src/queue.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/queue.h') diff --git a/src/queue.h b/src/queue.h index e27a470d9..b355a6a3e 100644 --- a/src/queue.h +++ b/src/queue.h @@ -312,6 +312,13 @@ queue_restore_order(struct queue *queue) queue->order[i] = i; } +/** + * 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. -- cgit v1.2.3