- char id[24]; /* ID */
- size_t start, used; /* start + bytes used */
- int eof; /* input is at EOF */
- int got_format; /* got format yet? */
- ao_sample_format format; /* sample format */
- unsigned long long played; /* number of frames played */
- char *buffer; /* sample buffer */
- size_t size; /* sample buffer size */
- int slot; /* poll array slot */
+
+ /** @brief Track ID */
+ char id[24];
+
+ /** @brief Start position of data in buffer */
+ size_t start;
+
+ /** @brief Number of bytes of data in buffer */
+ size_t used;
+
+ /** @brief Set @c fd is at EOF */
+ int eof;
+
+ /** @brief Total number of frames played */
+ unsigned long long played;
+
+ /** @brief Slot in @ref fds */
+ int slot;
+
+ /** @brief Set when playable
+ *
+ * A track becomes playable whenever it fills its buffer or reaches EOF; it
+ * stops being playable when it entirely empties its buffer. Tracks start
+ * out life not playable.
+ */
+ int playable;
+
+ /** @brief Input buffer
+ *
+ * 1Mbyte is enough for nearly 6s of 44100Hz 16-bit stereo
+ */
+ char buffer[1048576];