X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/90b8faa5f622bc62130ec6ee59b5fd785dd3c4e8..164f2e9387e91bf6fa19e43b8aa85cb031231ced:/lib/queue.h diff --git a/lib/queue.h b/lib/queue.h index 02937f6..2219763 100644 --- a/lib/queue.h +++ b/lib/queue.h @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004-2008 Richard Kettlewell + * Copyright (C) 2004-2009 Richard Kettlewell * * 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 @@ -188,7 +188,21 @@ struct queue_entry { /** @brief How much of track has been played so far (seconds) */ long sofar; - /** @brief True if decoder is connected to speaker */ + /** @brief True if track preparation is underway + * + * This is set when a decoder has been started and is expected to connect to + * the speaker, but the speaker has not sent as @ref SM_ARRIVED message back + * yet. */ + int preparing; + + /** @brief True if decoder is connected to speaker + * + * This is not a @ref playing_state for a couple of reasons + * - it is orthogonal to @ref playing_started and @ref playing_unplayed + * - it would have to be hidden to other users of @c queue_entry + * + * For non-raw tracks this should always be zero. + */ int prepared; /* For DISORDER_PLAYER_PAUSES only: */ @@ -224,6 +238,8 @@ int queue_unmarshall_vec(struct queue_entry *q, int nvec, char **vec, char *queue_marshall(const struct queue_entry *q); /* marshall @q@ into a UTF-8 string */ +void queue_free(struct queue_entry *q, int rest); + #endif /* QUEUE_H */ /*