mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-16 17:10:03 -04:00
[player] added some source code comments
This commit is contained in:
parent
e156181121
commit
36499f4997
@ -1644,6 +1644,10 @@ source_count()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Updates cur_playing and notifies remotes and raop devices about
|
||||||
|
* changes.
|
||||||
|
*/
|
||||||
static uint64_t
|
static uint64_t
|
||||||
source_check(void)
|
source_check(void)
|
||||||
{
|
{
|
||||||
@ -1667,6 +1671,7 @@ source_check(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If cur_playing is NULL, we are still in the first two seconds after starting the stream */
|
||||||
if (!cur_playing)
|
if (!cur_playing)
|
||||||
{
|
{
|
||||||
if (pos >= cur_streaming->output_start)
|
if (pos >= cur_streaming->output_start)
|
||||||
@ -1680,9 +1685,13 @@ source_check(void)
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if we are still in the middle of the current playing song */
|
||||||
if ((cur_playing->end == 0) || (pos < cur_playing->end))
|
if ((cur_playing->end == 0) || (pos < cur_playing->end))
|
||||||
return pos;
|
return pos;
|
||||||
|
|
||||||
|
/* We have reached the end of the current playing song, update cur_playing to the next song in the queue
|
||||||
|
and initialize stream_start and output_start values. */
|
||||||
|
|
||||||
r_mode = repeat;
|
r_mode = repeat;
|
||||||
/* Playlist has only one file, treat REPEAT_ALL as REPEAT_SONG */
|
/* Playlist has only one file, treat REPEAT_ALL as REPEAT_SONG */
|
||||||
if ((r_mode == REPEAT_ALL) && (source_head == source_head->pl_next))
|
if ((r_mode == REPEAT_ALL) && (source_head == source_head->pl_next))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user