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
55377fbd
Commit
55377fbd
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added enum player_queue_state
parent
ae003302
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
player.c
src/player.c
+2
-2
player.h
src/player.h
+11
-9
playlist.c
src/playlist.c
+6
-0
No files found.
src/player.c
View file @
55377fbd
...
...
@@ -176,12 +176,12 @@ int queueSong(Song * song)
return
-
1
;
}
int
getPlayerQueueState
(
void
)
enum
player_queue_state
getPlayerQueueState
(
void
)
{
return
pc
.
queueState
;
}
void
setQueueState
(
int
queueState
)
void
setQueueState
(
enum
player_queue_state
queueState
)
{
pc
.
queueState
=
queueState
;
notify_signal
(
&
pc
.
notify
);
...
...
src/player.h
View file @
55377fbd
...
...
@@ -52,12 +52,14 @@ enum player_command {
/* 0->1->2->3->5 regular playback
* ->4->0 don't play queued song
*/
#define PLAYER_QUEUE_BLANK 0
#define PLAYER_QUEUE_FULL 1
#define PLAYER_QUEUE_DECODE 2
#define PLAYER_QUEUE_PLAY 3
#define PLAYER_QUEUE_STOP 4
#define PLAYER_QUEUE_EMPTY 5
enum
player_queue_state
{
PLAYER_QUEUE_BLANK
=
0
,
PLAYER_QUEUE_FULL
=
1
,
PLAYER_QUEUE_DECODE
=
2
,
PLAYER_QUEUE_PLAY
=
3
,
PLAYER_QUEUE_STOP
=
4
,
PLAYER_QUEUE_EMPTY
=
5
};
#define PLAYER_QUEUE_UNLOCKED 0
#define PLAYER_QUEUE_LOCKED 1
...
...
@@ -76,7 +78,7 @@ typedef struct _PlayerControl {
volatile
float
fileTime
;
Song
*
volatile
next_song
;
Song
*
errored_song
;
volatile
mpd_sint8
queueState
;
volatile
enum
player_queue_state
queueState
;
volatile
mpd_sint8
queueLockState
;
volatile
double
seekWhere
;
volatile
float
crossFade
;
...
...
@@ -114,9 +116,9 @@ void playerWait(void);
int
queueSong
(
Song
*
song
);
int
getPlayerQueueState
(
void
);
enum
player_queue_state
getPlayerQueueState
(
void
);
void
setQueueState
(
int
queueState
);
void
setQueueState
(
enum
player_queue_state
queueState
);
void
playerQueueLock
(
void
);
...
...
src/playlist.c
View file @
55377fbd
...
...
@@ -553,6 +553,12 @@ static void clearPlayerQueue(void)
{
playlist
.
queued
=
-
1
;
switch
(
getPlayerQueueState
())
{
case
PLAYER_QUEUE_BLANK
:
case
PLAYER_QUEUE_DECODE
:
case
PLAYER_QUEUE_STOP
:
case
PLAYER_QUEUE_EMPTY
:
break
;
case
PLAYER_QUEUE_FULL
:
DEBUG
(
"playlist: dequeue song
\n
"
);
setQueueState
(
PLAYER_QUEUE_BLANK
);
...
...
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