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
2a06e2da
Commit
2a06e2da
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use switch/case in syncPlaylistWithQueue()
parent
110cef6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
playlist.c
src/playlist.c
+18
-8
No files found.
src/playlist.c
View file @
2a06e2da
...
@@ -507,22 +507,32 @@ static void queueNextSongInPlaylist(void)
...
@@ -507,22 +507,32 @@ static void queueNextSongInPlaylist(void)
static
void
syncPlaylistWithQueue
(
int
queue
)
static
void
syncPlaylistWithQueue
(
int
queue
)
{
{
if
(
queue
&&
getPlayerQueueState
()
==
PLAYER_QUEUE_BLANK
)
{
switch
(
getPlayerQueueState
())
{
queueNextSongInPlaylist
();
case
PLAYER_QUEUE_EMPTY
:
}
else
if
(
getPlayerQueueState
()
==
PLAYER_QUEUE_DECODE
)
{
if
(
playlist
.
queued
!=
-
1
)
setQueueState
(
PLAYER_QUEUE_PLAY
);
else
setQueueState
(
PLAYER_QUEUE_STOP
);
}
else
if
(
getPlayerQueueState
()
==
PLAYER_QUEUE_EMPTY
)
{
setQueueState
(
PLAYER_QUEUE_BLANK
);
setQueueState
(
PLAYER_QUEUE_BLANK
);
if
(
playlist
.
queued
>=
0
)
{
if
(
playlist
.
queued
>=
0
)
{
DEBUG
(
"playlist: now playing queued song
\n
"
);
DEBUG
(
"playlist: now playing queued song
\n
"
);
playlist
.
current
=
playlist
.
queued
;
playlist
.
current
=
playlist
.
queued
;
}
}
playlist
.
queued
=
-
1
;
playlist
.
queued
=
-
1
;
/* intentionally no break here */
case
PLAYER_QUEUE_BLANK
:
if
(
queue
)
if
(
queue
)
queueNextSongInPlaylist
();
queueNextSongInPlaylist
();
break
;
case
PLAYER_QUEUE_DECODE
:
if
(
playlist
.
queued
!=
-
1
)
setQueueState
(
PLAYER_QUEUE_PLAY
);
else
setQueueState
(
PLAYER_QUEUE_STOP
);
break
;
case
PLAYER_QUEUE_FULL
:
case
PLAYER_QUEUE_PLAY
:
case
PLAYER_QUEUE_STOP
:
break
;
}
}
}
}
...
...
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