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
bedd5f00
Commit
bedd5f00
authored
Nov 11, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Control: move code to SeekLocked()
parent
36239895
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
Control.cxx
src/player/Control.cxx
+12
-5
Control.hxx
src/player/Control.hxx
+2
-0
No files found.
src/player/Control.cxx
View file @
bedd5f00
...
...
@@ -220,13 +220,11 @@ PlayerControl::LockEnqueueSong(DetachedSong *song)
Unlock
();
}
bool
PlayerControl
::
LockSeek
(
DetachedSong
*
song
,
SongTime
t
)
void
PlayerControl
::
SeekLocked
(
DetachedSong
*
song
,
SongTime
t
)
{
assert
(
song
!=
nullptr
);
Lock
();
if
(
next_song
!=
nullptr
)
SynchronousCommand
(
PlayerCommand
::
CANCEL
);
...
...
@@ -235,9 +233,18 @@ PlayerControl::LockSeek(DetachedSong *song, SongTime t)
next_song
=
song
;
seek_time
=
t
;
SynchronousCommand
(
PlayerCommand
::
SEEK
);
Unlock
();
assert
(
next_song
==
nullptr
);
}
bool
PlayerControl
::
LockSeek
(
DetachedSong
*
song
,
SongTime
t
)
{
assert
(
song
!=
nullptr
);
Lock
();
SeekLocked
(
song
,
t
);
Unlock
();
idle_add
(
IDLE_PLAYER
);
...
...
src/player/Control.hxx
View file @
bedd5f00
...
...
@@ -427,6 +427,8 @@ private:
SynchronousCommand
(
PlayerCommand
::
QUEUE
);
}
void
SeekLocked
(
DetachedSong
*
song
,
SongTime
t
);
public
:
/**
* @param song the song to be queued; the given instance will be owned
...
...
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