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
d2e47e01
Commit
d2e47e01
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: reduce unlock/lock overhead in PlayerCommand::PAUSE handler
parent
a5b8d791
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
Thread.cxx
src/player/Thread.cxx
+3
-9
No files found.
src/player/Thread.cxx
View file @
d2e47e01
...
@@ -681,23 +681,17 @@ Player::ProcessCommand()
...
@@ -681,23 +681,17 @@ Player::ProcessCommand()
break
;
break
;
case
PlayerCommand
:
:
PAUSE
:
case
PlayerCommand
:
:
PAUSE
:
pc
.
Unlock
();
paused
=
!
paused
;
paused
=
!
paused
;
if
(
paused
)
{
if
(
paused
)
{
pc
.
outputs
.
Pause
();
pc
.
Lock
();
pc
.
state
=
PlayerState
::
PAUSE
;
pc
.
state
=
PlayerState
::
PAUSE
;
const
ScopeUnlock
unlock
(
pc
.
mutex
);
pc
.
outputs
.
Pause
();
}
else
if
(
!
play_audio_format
.
IsDefined
())
{
}
else
if
(
!
play_audio_format
.
IsDefined
())
{
/* the decoder hasn't provided an audio format
/* the decoder hasn't provided an audio format
yet - don't open the audio device yet */
yet - don't open the audio device yet */
pc
.
Lock
();
pc
.
state
=
PlayerState
::
PLAY
;
pc
.
state
=
PlayerState
::
PLAY
;
}
else
{
}
else
{
pc
.
Lock
();
OpenOutput
();
OpenOutput
();
}
}
...
...
This diff is collapsed.
Click to expand it.
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