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
9f79c05e
Commit
9f79c05e
authored
Mar 09, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player_thread: moved code to player_song_border()
Moved some more cruft out of do_play().
parent
4459a461
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
player_thread.c
src/player_thread.c
+19
-6
No files found.
src/player_thread.c
View file @
9f79c05e
...
...
@@ -459,6 +459,24 @@ play_next_chunk(struct player *player)
return
true
;
}
/**
* This is called at the border between two songs: the audio output
* has consumed all chunks of the current song, and we should start
* sending chunks from the next one.
*
* @return true on success, false on error (playback will be stopped)
*/
static
bool
player_song_border
(
struct
player
*
player
)
{
player
->
xfade
=
XFADE_UNKNOWN
;
music_pipe_free
(
player
->
pipe
);
player
->
pipe
=
dc
.
pipe
;
return
player_wait_for_decoder
(
player
);
}
static
void
do_play
(
void
)
{
struct
player
player
=
{
...
...
@@ -572,12 +590,7 @@ static void do_play(void)
}
else
if
(
dc
.
pipe
!=
NULL
&&
dc
.
pipe
!=
player
.
pipe
)
{
/* at the beginning of a new song */
player
.
xfade
=
XFADE_UNKNOWN
;
music_pipe_free
(
player
.
pipe
);
player
.
pipe
=
dc
.
pipe
;
if
(
!
player_wait_for_decoder
(
&
player
))
if
(
!
player_song_border
(
&
player
))
break
;
}
else
if
(
decoder_is_idle
())
{
break
;
...
...
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