2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2013-01-04 20:50:00 +01:00
|
|
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2004-02-24 00:41:20 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-02-24 00:41:20 +01:00
|
|
|
*/
|
|
|
|
|
2009-11-12 09:12:38 +01:00
|
|
|
#include "config.h"
|
2013-01-07 10:55:05 +01:00
|
|
|
#include "Playlist.hxx"
|
2013-01-04 22:31:53 +01:00
|
|
|
#include "PlayerControl.hxx"
|
2008-10-08 10:49:11 +02:00
|
|
|
#include "song.h"
|
2013-01-09 08:36:52 +01:00
|
|
|
#include "Idle.hxx"
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2008-10-15 19:36:37 +02:00
|
|
|
#include <glib.h>
|
|
|
|
|
2008-12-29 17:28:32 +01:00
|
|
|
#include <assert.h>
|
2004-06-05 03:14:37 +02:00
|
|
|
|
2009-02-04 22:15:31 +01:00
|
|
|
#undef G_LOG_DOMAIN
|
|
|
|
#define G_LOG_DOMAIN "playlist"
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-09 22:21:16 +01:00
|
|
|
playlist::FullIncrementVersions()
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-09 22:21:16 +01:00
|
|
|
queue.ModifyAll();
|
2009-01-22 23:40:11 +01:00
|
|
|
idle_add(IDLE_PLAYLIST);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-02-04 18:56:41 +01:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::TagChanged()
|
2009-01-20 22:49:19 +01:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (!playing)
|
2009-01-20 22:49:19 +01:00
|
|
|
return;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
assert(current >= 0);
|
2009-01-23 00:09:26 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.ModifyAtOrder(current);
|
2009-01-22 23:40:11 +01:00
|
|
|
idle_add(IDLE_PLAYLIST);
|
2009-01-20 22:49:19 +01:00
|
|
|
}
|
|
|
|
|
2009-01-23 07:33:15 +01:00
|
|
|
/**
|
|
|
|
* Queue a song, addressed by its order number.
|
|
|
|
*/
|
2009-01-23 00:06:54 +01:00
|
|
|
static void
|
2009-11-03 21:08:48 +01:00
|
|
|
playlist_queue_song_order(struct playlist *playlist, struct player_control *pc,
|
|
|
|
unsigned order)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2009-01-23 00:06:54 +01:00
|
|
|
char *uri;
|
2009-01-04 19:09:34 +01:00
|
|
|
|
2013-01-06 21:33:58 +01:00
|
|
|
assert(playlist->queue.IsValidOrder(order));
|
2009-01-04 19:09:34 +01:00
|
|
|
|
2009-02-04 18:56:41 +01:00
|
|
|
playlist->queued = order;
|
2009-01-04 19:09:34 +01:00
|
|
|
|
2012-08-09 22:19:39 +02:00
|
|
|
struct song *song =
|
2013-01-06 21:33:58 +01:00
|
|
|
song_dup_detached(playlist->queue.GetOrder(order));
|
2012-08-09 22:19:39 +02:00
|
|
|
|
2009-01-23 00:06:54 +01:00
|
|
|
uri = song_get_uri(song);
|
2009-02-04 22:15:31 +01:00
|
|
|
g_debug("queue song %i:\"%s\"", playlist->queued, uri);
|
2009-01-23 00:06:54 +01:00
|
|
|
g_free(uri);
|
|
|
|
|
2009-11-03 21:08:48 +01:00
|
|
|
pc_enqueue_song(pc, song);
|
2009-01-23 00:06:54 +01:00
|
|
|
}
|
2009-01-04 19:09:34 +01:00
|
|
|
|
2009-01-23 07:33:15 +01:00
|
|
|
/**
|
2010-06-19 13:33:32 +02:00
|
|
|
* Called if the player thread has started playing the "queued" song.
|
2009-01-23 07:33:15 +01:00
|
|
|
*/
|
2009-07-29 00:07:01 +02:00
|
|
|
static void
|
2009-11-03 21:08:48 +01:00
|
|
|
playlist_song_started(struct playlist *playlist, struct player_control *pc)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2009-11-03 21:08:48 +01:00
|
|
|
assert(pc->next_song == NULL);
|
2010-06-19 13:33:32 +02:00
|
|
|
assert(playlist->queued >= -1);
|
2009-01-23 07:33:15 +01:00
|
|
|
|
2010-06-19 13:33:32 +02:00
|
|
|
/* queued song has started: copy queued to current,
|
|
|
|
and notify the clients */
|
2010-06-01 09:59:46 +02:00
|
|
|
|
2010-06-19 13:33:32 +02:00
|
|
|
int current = playlist->current;
|
|
|
|
playlist->current = playlist->queued;
|
|
|
|
playlist->queued = -1;
|
2010-05-31 23:32:11 +02:00
|
|
|
|
2010-06-19 13:33:32 +02:00
|
|
|
if(playlist->queue.consume)
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist->DeleteOrder(*pc, current);
|
2010-06-19 13:33:32 +02:00
|
|
|
|
|
|
|
idle_add(IDLE_PLAYER);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-02-04 20:31:22 +01:00
|
|
|
const struct song *
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::GetQueuedSong() const
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
return playing && queued >= 0
|
|
|
|
? queue.GetOrder(queued)
|
|
|
|
: nullptr;
|
2009-02-04 18:52:37 +01:00
|
|
|
}
|
|
|
|
|
2009-02-04 20:31:22 +01:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::UpdateQueuedSong(player_control &pc, const song *prev)
|
2009-02-04 18:52:37 +01:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (!playing)
|
2009-02-04 18:52:37 +01:00
|
|
|
return;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
assert(!queue.IsEmpty());
|
|
|
|
assert((queued < 0) == (prev == NULL));
|
2009-02-04 18:52:37 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
const int next_order = current >= 0
|
|
|
|
? queue.GetNextOrder(current)
|
2009-02-04 18:52:37 +01:00
|
|
|
: 0;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
if (next_order == 0 && queue.random && !queue.single) {
|
2009-02-04 18:52:37 +01:00
|
|
|
/* shuffle the song order again, so we get a different
|
|
|
|
order each time the playlist is played
|
|
|
|
completely */
|
2013-01-07 10:55:05 +01:00
|
|
|
const unsigned current_position =
|
|
|
|
queue.OrderToPosition(current);
|
2009-02-04 18:52:37 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.ShuffleOrder();
|
2009-02-04 18:52:37 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
/* make sure that the current still points to
|
2009-02-04 18:52:37 +01:00
|
|
|
the current song, after the song order has been
|
|
|
|
shuffled */
|
2013-01-07 10:55:05 +01:00
|
|
|
current = queue.PositionToOrder(current_position);
|
2009-02-04 18:52:37 +01:00
|
|
|
}
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
const struct song *const next_song = next_order >= 0
|
|
|
|
? queue.GetOrder(next_order)
|
|
|
|
: nullptr;
|
2009-02-04 18:52:37 +01:00
|
|
|
|
|
|
|
if (prev != NULL && next_song != prev) {
|
|
|
|
/* clear the currently queued song */
|
2013-01-07 10:55:05 +01:00
|
|
|
pc_cancel(&pc);
|
|
|
|
queued = -1;
|
2009-02-04 18:52:37 +01:00
|
|
|
}
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2009-02-04 18:52:37 +01:00
|
|
|
if (next_order >= 0) {
|
|
|
|
if (next_song != prev)
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist_queue_song_order(this, &pc, next_order);
|
2009-02-04 18:52:37 +01:00
|
|
|
else
|
2013-01-07 10:55:05 +01:00
|
|
|
queued = next_order;
|
2009-02-04 18:52:37 +01:00
|
|
|
}
|
2008-04-12 06:11:56 +02:00
|
|
|
}
|
|
|
|
|
2009-02-04 20:31:22 +01:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::PlayOrder(player_control &pc, int order)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
playing = true;
|
|
|
|
queued = -1;
|
2007-12-28 03:56:25 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
struct song *song = song_dup_detached(queue.GetOrder(order));
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
char *uri = song_get_uri(song);
|
|
|
|
g_debug("play %i:\"%s\"", order, uri);
|
2009-01-04 19:09:34 +01:00
|
|
|
g_free(uri);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
pc_play(&pc, song);
|
|
|
|
current = order;
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-02-04 18:56:41 +01:00
|
|
|
static void
|
2009-11-03 21:08:48 +01:00
|
|
|
playlist_resume_playback(struct playlist *playlist, struct player_control *pc);
|
2009-01-21 16:17:57 +01:00
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::SyncWithPlayer(player_control &pc)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (!playing)
|
2009-01-23 07:33:15 +01:00
|
|
|
/* this event has reached us out of sync: we aren't
|
|
|
|
playing anymore; ignore the event */
|
2006-07-20 18:02:40 +02:00
|
|
|
return;
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
player_lock(&pc);
|
|
|
|
const enum player_state pc_state = pc_get_state(&pc);
|
|
|
|
const song *pc_next_song = pc.next_song;
|
|
|
|
player_unlock(&pc);
|
2010-06-19 13:15:42 +02:00
|
|
|
|
|
|
|
if (pc_state == PLAYER_STATE_STOP)
|
2009-01-23 07:33:15 +01:00
|
|
|
/* the player thread has stopped: check if playback
|
|
|
|
should be restarted with the next song. That can
|
|
|
|
happen if the playlist isn't filling the queue fast
|
|
|
|
enough */
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist_resume_playback(this, &pc);
|
2008-08-26 08:27:18 +02:00
|
|
|
else {
|
2009-01-23 07:33:15 +01:00
|
|
|
/* check if the player thread has already started
|
|
|
|
playing the queued song */
|
2013-01-07 10:55:05 +01:00
|
|
|
if (pc_next_song == nullptr && queued != -1)
|
|
|
|
playlist_song_started(this, &pc);
|
2009-01-23 07:33:15 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
player_lock(&pc);
|
|
|
|
pc_next_song = pc.next_song;
|
|
|
|
player_unlock(&pc);
|
2012-08-15 22:47:08 +02:00
|
|
|
|
2009-01-23 07:33:15 +01:00
|
|
|
/* make sure the queued song is always set (if
|
|
|
|
possible) */
|
2013-01-07 10:55:05 +01:00
|
|
|
if (pc_next_song == nullptr && queued < 0)
|
|
|
|
UpdateQueuedSong(pc, nullptr);
|
2008-08-26 08:27:18 +02:00
|
|
|
}
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-01-23 07:33:15 +01:00
|
|
|
/**
|
|
|
|
* The player has stopped for some reason. Check the error, and
|
|
|
|
* decide whether to re-start playback
|
|
|
|
*/
|
2009-02-04 18:56:41 +01:00
|
|
|
static void
|
2009-11-03 21:08:48 +01:00
|
|
|
playlist_resume_playback(struct playlist *playlist, struct player_control *pc)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2009-01-23 06:40:52 +01:00
|
|
|
enum player_error error;
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2009-02-04 18:56:41 +01:00
|
|
|
assert(playlist->playing);
|
2009-11-03 21:08:48 +01:00
|
|
|
assert(pc_get_state(pc) == PLAYER_STATE_STOP);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2012-08-08 22:25:02 +02:00
|
|
|
error = pc_get_error_type(pc);
|
2012-08-08 22:22:00 +02:00
|
|
|
if (error == PLAYER_ERROR_NONE)
|
2009-02-04 18:56:41 +01:00
|
|
|
playlist->error_count = 0;
|
2009-01-23 06:40:52 +01:00
|
|
|
else
|
2009-02-04 18:56:41 +01:00
|
|
|
++playlist->error_count;
|
2009-01-23 06:40:52 +01:00
|
|
|
|
2012-08-08 22:22:00 +02:00
|
|
|
if ((playlist->stop_on_error && error != PLAYER_ERROR_NONE) ||
|
|
|
|
error == PLAYER_ERROR_OUTPUT ||
|
2013-01-06 21:33:58 +01:00
|
|
|
playlist->error_count >= playlist->queue.GetLength())
|
2009-01-23 07:33:15 +01:00
|
|
|
/* too many errors, or critical error: stop
|
|
|
|
playback */
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist->Stop(*pc);
|
2009-01-23 06:40:52 +01:00
|
|
|
else
|
2009-01-23 07:33:15 +01:00
|
|
|
/* continue playback at the next song */
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist->PlayNext(*pc);
|
2009-03-30 00:01:02 +02:00
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::SetRepeat(player_control &pc, bool status)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (status == queue.repeat)
|
2009-01-23 00:07:20 +01:00
|
|
|
return;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.repeat = status;
|
2012-08-25 08:44:31 +02:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
pc_set_border_pause(&pc, queue.single && !queue.repeat);
|
2008-10-14 22:38:14 +02:00
|
|
|
|
2009-02-04 18:52:37 +01:00
|
|
|
/* if the last song is currently being played, the "next song"
|
|
|
|
might change when repeat mode is toggled */
|
2013-01-07 10:55:05 +01:00
|
|
|
UpdateQueuedSong(pc, GetQueuedSong());
|
2009-02-04 18:52:37 +01:00
|
|
|
|
2008-10-14 22:38:14 +02:00
|
|
|
idle_add(IDLE_OPTIONS);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
static void
|
|
|
|
playlist_order(struct playlist *playlist)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2009-02-04 18:56:41 +01:00
|
|
|
if (playlist->current >= 0)
|
2009-01-23 07:33:15 +01:00
|
|
|
/* update playlist.current, order==position now */
|
2013-01-06 21:33:58 +01:00
|
|
|
playlist->current = playlist->queue.OrderToPosition(playlist->current);
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-06 21:33:58 +01:00
|
|
|
playlist->queue.RestoreOrder();
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::SetSingle(player_control &pc, bool status)
|
2009-03-27 14:42:55 +01:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (status == queue.single)
|
2009-03-27 15:28:49 +01:00
|
|
|
return;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.single = status;
|
2012-08-25 08:44:31 +02:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
pc_set_border_pause(&pc, queue.single && !queue.repeat);
|
2009-03-27 14:42:55 +01:00
|
|
|
|
|
|
|
/* if the last song is currently being played, the "next song"
|
2009-03-27 15:28:49 +01:00
|
|
|
might change when single mode is toggled */
|
2013-01-07 10:55:05 +01:00
|
|
|
UpdateQueuedSong(pc, GetQueuedSong());
|
2009-03-27 14:42:55 +01:00
|
|
|
|
|
|
|
idle_add(IDLE_OPTIONS);
|
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::SetConsume(bool status)
|
2009-03-30 00:01:02 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (status == queue.consume)
|
2009-03-30 00:01:02 +02:00
|
|
|
return;
|
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.consume = status;
|
2009-03-30 00:01:02 +02:00
|
|
|
idle_add(IDLE_OPTIONS);
|
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
void
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::SetRandom(player_control &pc, bool status)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (status == queue.random)
|
2008-10-08 11:05:02 +02:00
|
|
|
return;
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
const struct song *const queued_song = GetQueuedSong();
|
2009-01-23 00:07:10 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.random = status;
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
if (queue.random) {
|
|
|
|
/* shuffle the queue order, but preserve current */
|
2009-01-23 07:33:15 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
const int current_position = GetCurrentPosition();
|
2009-01-23 00:08:40 +01:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.ShuffleOrder();
|
2009-01-23 00:08:40 +01:00
|
|
|
|
|
|
|
if (current_position >= 0) {
|
2009-01-23 07:33:15 +01:00
|
|
|
/* make sure the current song is the first in
|
|
|
|
the order list, so the whole rest of the
|
|
|
|
playlist is played after that */
|
2009-01-23 00:08:40 +01:00
|
|
|
unsigned current_order =
|
2013-01-07 10:55:05 +01:00
|
|
|
queue.PositionToOrder(current_position);
|
|
|
|
queue.SwapOrders(0, current_order);
|
|
|
|
current = 0;
|
2009-02-11 18:02:50 +01:00
|
|
|
} else
|
2013-01-07 10:55:05 +01:00
|
|
|
current = -1;
|
2008-10-08 11:05:02 +02:00
|
|
|
} else
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist_order(this);
|
2008-10-14 22:38:14 +02:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
UpdateQueuedSong(pc, queued_song);
|
2009-02-04 18:52:37 +01:00
|
|
|
|
2008-10-14 22:38:14 +02:00
|
|
|
idle_add(IDLE_OPTIONS);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
int
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::GetCurrentPosition() const
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
return current >= 0
|
|
|
|
? queue.OrderToPosition(current)
|
|
|
|
: -1;
|
2006-03-26 15:46:05 +02:00
|
|
|
}
|
|
|
|
|
2009-07-29 00:07:01 +02:00
|
|
|
int
|
2013-01-07 10:55:05 +01:00
|
|
|
playlist::GetNextPosition() const
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-01-07 10:55:05 +01:00
|
|
|
if (current < 0)
|
|
|
|
return -1;
|
2006-03-26 15:46:05 +02:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
if (queue.single && queue.repeat)
|
|
|
|
return queue.OrderToPosition(current);
|
|
|
|
else if (queue.IsValidOrder(current + 1))
|
|
|
|
return queue.OrderToPosition(current + 1);
|
|
|
|
else if (queue.repeat)
|
|
|
|
return queue.OrderToPosition(0);
|
2006-03-26 15:46:05 +02:00
|
|
|
|
2013-01-07 10:55:05 +01:00
|
|
|
return -1;
|
2006-03-26 15:46:05 +02:00
|
|
|
}
|