Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ce57b8b6
Commit
ce57b8b6
authored
Jan 08, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue: move HASH_MULT and Item into the Queue class
parent
d81a9029
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
Queue.hxx
src/Queue.hxx
+15
-17
No files found.
src/Queue.hxx
View file @
ce57b8b6
...
@@ -28,19 +28,28 @@
...
@@ -28,19 +28,28 @@
#include <assert.h>
#include <assert.h>
#include <stdint.h>
#include <stdint.h>
enum
{
/**
* A queue of songs. This is the backend of the playlist: it contains
* an ordered list of songs.
*
* Songs can be addressed in three possible ways:
*
* - the position in the queue
* - the unique id (which stays the same, regardless of moves)
* - the order number (which only differs from "position" in random mode)
*/
struct
queue
{
/**
/**
* reserve max_length * QUEUE_HASH_MULT elements in the id
* reserve max_length * QUEUE_HASH_MULT elements in the id
* number space
* number space
*/
*/
QUEUE_HASH_MULT
=
4
,
static
constexpr
unsigned
QUEUE_HASH_MULT
=
4
;
};
/**
/**
* One element of the queue: basically a song plus some queue specific
* One element of the queue: basically a song plus some queue specific
* information attached.
* information attached.
*/
*/
struct
queue_item
{
struct
queue_item
{
struct
song
*
song
;
struct
song
*
song
;
/** the unique id of this item in the queue */
/** the unique id of this item in the queue */
...
@@ -55,19 +64,8 @@ struct queue_item {
...
@@ -55,19 +64,8 @@ struct queue_item {
* "random" mode.
* "random" mode.
*/
*/
uint8_t
priority
;
uint8_t
priority
;
};
};
/**
* A queue of songs. This is the backend of the playlist: it contains
* an ordered list of songs.
*
* Songs can be addressed in three possible ways:
*
* - the position in the queue
* - the unique id (which stays the same, regardless of moves)
* - the order number (which only differs from "position" in random mode)
*/
struct
queue
{
/** configured maximum length of the queue */
/** configured maximum length of the queue */
unsigned
max_length
;
unsigned
max_length
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment