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
2fcbabf4
Commit
2fcbabf4
authored
Oct 11, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player: removed set_current_song()
set_current_song() is an internal function and consists of only one assignment. Eliminate it.
parent
42409a35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
player_control.c
src/player_control.c
+5
-13
No files found.
src/player_control.c
View file @
2fcbabf4
...
...
@@ -44,15 +44,6 @@ void pc_deinit(void)
notify_deinit
(
&
pc
.
notify
);
}
static
void
set_current_song
(
struct
song
*
song
)
{
assert
(
song
!=
NULL
);
assert
(
song
->
url
!=
NULL
);
pc
.
next_song
=
song
;
}
static
void
player_command
(
enum
player_command
cmd
)
{
pc
.
command
=
cmd
;
...
...
@@ -65,6 +56,7 @@ static void player_command(enum player_command cmd)
void
playerPlay
(
struct
song
*
song
)
{
assert
(
song
!=
NULL
);
assert
(
pc
.
queueLockState
==
PLAYER_QUEUE_UNLOCKED
);
if
(
pc
.
state
!=
PLAYER_STATE_STOP
)
...
...
@@ -72,7 +64,7 @@ playerPlay(struct song *song)
pc
.
queueState
=
PLAYER_QUEUE_BLANK
;
set_current_song
(
song
)
;
pc
.
next_song
=
song
;
player_command
(
PLAYER_COMMAND_PLAY
);
}
...
...
@@ -179,9 +171,10 @@ char *getPlayerErrorStr(void)
void
queueSong
(
struct
song
*
song
)
{
assert
(
song
!=
NULL
);
assert
(
pc
.
queueState
==
PLAYER_QUEUE_BLANK
);
set_current_song
(
song
)
;
pc
.
next_song
=
song
;
pc
.
queueState
=
PLAYER_QUEUE_FULL
;
}
...
...
@@ -219,8 +212,7 @@ playerSeek(struct song *song, float seek_time)
if
(
pc
.
state
==
PLAYER_STATE_STOP
)
return
-
1
;
if
(
pc
.
next_song
!=
song
)
set_current_song
(
song
);
pc
.
next_song
=
song
;
if
(
pc
.
error
==
PLAYER_ERROR_NOERROR
)
{
pc
.
seekWhere
=
seek_time
;
...
...
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