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
7d3429a6
Commit
7d3429a6
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed the "queue" parameter from syncPlaylistWithQueue()
There is only one caller which passes "true", so we can move the queueNextSongInPlaylist() invocation there.
parent
a9f0d851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
playlist.c
src/playlist.c
+11
-12
No files found.
src/playlist.c
View file @
7d3429a6
...
...
@@ -505,7 +505,7 @@ static void queueNextSongInPlaylist(void)
}
}
static
void
syncPlaylistWithQueue
(
int
queue
)
static
void
syncPlaylistWithQueue
(
void
)
{
switch
(
getPlayerQueueState
())
{
case
PLAYER_QUEUE_EMPTY
:
...
...
@@ -515,11 +515,6 @@ static void syncPlaylistWithQueue(int queue)
playlist
.
current
=
playlist
.
queued
;
}
playlist
.
queued
=
-
1
;
/* intentionally no break here */
case
PLAYER_QUEUE_BLANK
:
if
(
queue
)
queueNextSongInPlaylist
();
break
;
case
PLAYER_QUEUE_DECODE
:
...
...
@@ -532,6 +527,7 @@ static void syncPlaylistWithQueue(int queue)
case
PLAYER_QUEUE_FULL
:
case
PLAYER_QUEUE_PLAY
:
case
PLAYER_QUEUE_STOP
:
case
PLAYER_QUEUE_BLANK
:
break
;
}
}
...
...
@@ -541,7 +537,7 @@ static void clearPlayerQueue(void)
if
(
getPlayerQueueState
()
==
PLAYER_QUEUE_PLAY
||
getPlayerQueueState
()
==
PLAYER_QUEUE_FULL
)
{
playerQueueLock
();
syncPlaylistWithQueue
(
0
);
syncPlaylistWithQueue
();
}
playlist
.
queued
=
-
1
;
...
...
@@ -937,8 +933,11 @@ void syncPlayerAndPlaylist(void)
if
(
getPlayerState
()
==
PLAYER_STATE_STOP
)
playPlaylistIfPlayerStopped
();
else
syncPlaylistWithQueue
(
1
);
else
{
syncPlaylistWithQueue
();
if
(
getPlayerQueueState
()
==
PLAYER_QUEUE_BLANK
)
queueNextSongInPlaylist
();
}
syncCurrentPlayerDecodeMetadata
();
}
...
...
@@ -950,7 +949,7 @@ static void currentSongInPlaylist(void)
playlist_stopOnError
=
0
;
syncPlaylistWithQueue
(
0
);
syncPlaylistWithQueue
();
if
(
playlist
.
current
>=
0
&&
playlist
.
current
<
playlist
.
length
)
playPlaylistOrderNumber
(
playlist
.
current
);
...
...
@@ -963,7 +962,7 @@ void nextSongInPlaylist(void)
if
(
playlist_state
!=
PLAYLIST_STATE_PLAY
)
return
;
syncPlaylistWithQueue
(
0
);
syncPlaylistWithQueue
();
playlist_stopOnError
=
0
;
...
...
@@ -1223,7 +1222,7 @@ void previousSongInPlaylist(void)
if
(
playlist_state
!=
PLAYLIST_STATE_PLAY
)
return
;
syncPlaylistWithQueue
(
0
);
syncPlaylistWithQueue
();
if
(
diff
&&
getPlayerElapsedTime
()
>
PLAYLIST_PREV_UNLESS_ELAPSED
)
{
playPlaylistOrderNumber
(
playlist
.
current
);
...
...
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