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
9dc7b5a6
Commit
9dc7b5a6
authored
Oct 27, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: move ResetCrossFade() calls to where pipes are set
Move ResetCrossFade() to where cross-fading would actually break, to make the cross-fading state more reliable.
parent
f5d21c9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
Thread.cxx
src/player/Thread.cxx
+8
-3
No files found.
src/player/Thread.cxx
View file @
9dc7b5a6
...
...
@@ -176,11 +176,13 @@ private:
}
void
ClearAndReplacePipe
(
MusicPipe
*
_pipe
)
{
ResetCrossFade
();
ClearAndDeletePipe
();
pipe
=
_pipe
;
}
void
ReplacePipe
(
MusicPipe
*
_pipe
)
{
ResetCrossFade
();
delete
pipe
;
pipe
=
_pipe
;
}
...
...
@@ -335,6 +337,11 @@ Player::StopDecoder()
delete
dc
.
pipe
;
dc
.
pipe
=
nullptr
;
/* just in case we've been cross-fading: cancel it
now, because we just deleted the new song's decoder
pipe */
ResetCrossFade
();
}
}
...
...
@@ -599,7 +606,7 @@ Player::SeekDecoder()
player_command_finished
(
pc
);
ResetCrossFade
(
);
assert
(
xfade_state
==
CrossFadeState
::
UNKNOWN
);
/* re-fill the buffer after seeking */
buffering
=
true
;
...
...
@@ -905,8 +912,6 @@ Player::PlayNextChunk()
inline
bool
Player
::
SongBorder
()
{
ResetCrossFade
();
FormatDefault
(
player_domain
,
"played
\"
%s
\"
"
,
song
->
GetURI
());
ReplacePipe
(
dc
.
pipe
);
...
...
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