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
4286f55c
Commit
4286f55c
authored
Dec 20, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: use C++11 initializers
parent
0a7cad90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
22 deletions
+11
-22
Thread.cxx
src/player/Thread.cxx
+11
-22
No files found.
src/player/Thread.cxx
View file @
4286f55c
...
...
@@ -55,29 +55,29 @@ class Player {
/**
* are we waiting for buffered_before_play?
*/
bool
buffering
;
bool
buffering
=
true
;
/**
* true if the decoder is starting and did not provide data
* yet
*/
bool
decoder_starting
;
bool
decoder_starting
=
false
;
/**
* Did we wake up the DecoderThread recently? This avoids
* duplicate wakeup calls.
*/
bool
decoder_woken
;
bool
decoder_woken
=
false
;
/**
* is the player paused?
*/
bool
paused
;
bool
paused
=
false
;
/**
* is there a new song in pc.next_song?
*/
bool
queued
;
bool
queued
=
true
;
/**
* Was any audio output opened successfully? It might have
...
...
@@ -85,7 +85,7 @@ class Player {
* player thread. When this flag is unset, some output
* methods must not be called.
*/
bool
output_open
;
bool
output_open
=
false
;
/**
* the song currently being played
...
...
@@ -119,19 +119,19 @@ class Player {
* Currently cross-fading to the next song.
*/
ACTIVE
,
}
xfade_state
;
}
xfade_state
=
CrossFadeState
::
UNKNOWN
;
/**
* The number of chunks used for crossfading.
*/
unsigned
cross_fade_chunks
;
unsigned
cross_fade_chunks
=
0
;
/**
* The tag of the "next" song during cross-fade. It is
* postponed, and sent to the output thread when the new song
* really begins.
*/
Tag
*
cross_fade_tag
;
Tag
*
cross_fade_tag
=
nullptr
;
/**
* The current audio format for the audio outputs.
...
...
@@ -145,25 +145,14 @@ class Player {
* value; the output thread can estimate the elapsed time more
* precisely.
*/
SongTime
elapsed_time
;
SongTime
elapsed_time
=
SongTime
::
zero
()
;
PeriodClock
throttle_silence_log
;
public
:
Player
(
PlayerControl
&
_pc
,
DecoderControl
&
_dc
,
MusicBuffer
&
_buffer
)
noexcept
:
pc
(
_pc
),
dc
(
_dc
),
buffer
(
_buffer
),
buffering
(
true
),
decoder_starting
(
false
),
decoder_woken
(
false
),
paused
(
false
),
queued
(
true
),
output_open
(
false
),
song
(
nullptr
),
xfade_state
(
CrossFadeState
::
UNKNOWN
),
cross_fade_chunks
(
0
),
cross_fade_tag
(
nullptr
),
elapsed_time
(
SongTime
::
zero
())
{}
:
pc
(
_pc
),
dc
(
_dc
),
buffer
(
_buffer
)
{}
private
:
/**
...
...
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