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
cd4bb444
Commit
cd4bb444
authored
Dec 03, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Control: make ReplayGainConfig const
parent
e4435139
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
Partition.cxx
src/Partition.cxx
+3
-2
Control.cxx
src/player/Control.cxx
+4
-2
Control.hxx
src/player/Control.hxx
+4
-5
run_output.cxx
test/run_output.cxx
+6
-3
No files found.
src/Partition.cxx
View file @
cd4bb444
...
...
@@ -33,7 +33,8 @@ Partition::Partition(Instance &_instance,
global_events
(
instance
.
event_loop
,
BIND_THIS_METHOD
(
OnGlobalEvent
)),
playlist
(
max_length
,
*
this
),
outputs
(
*
this
),
pc
(
*
this
,
outputs
,
buffer_chunks
,
buffered_before_play
)
pc
(
*
this
,
outputs
,
buffer_chunks
,
buffered_before_play
,
replay_gain_config
)
{
}
...
...
@@ -51,7 +52,7 @@ Partition::UpdateEffectiveReplayGainMode(ReplayGainMode mode)
?
ReplayGainMode
::
TRACK
:
ReplayGainMode
::
ALBUM
;
pc
.
LockSetReplayGain
(
replay_gain_config
,
mode
);
pc
.
LockSetReplayGain
Mode
(
mode
);
outputs
.
SetReplayGainMode
(
mode
);
}
...
...
src/player/Control.cxx
View file @
cd4bb444
...
...
@@ -29,10 +29,12 @@
PlayerControl
::
PlayerControl
(
PlayerListener
&
_listener
,
MultipleOutputs
&
_outputs
,
unsigned
_buffer_chunks
,
unsigned
_buffered_before_play
)
unsigned
_buffered_before_play
,
const
ReplayGainConfig
&
_replay_gain_config
)
:
listener
(
_listener
),
outputs
(
_outputs
),
buffer_chunks
(
_buffer_chunks
),
buffered_before_play
(
_buffered_before_play
)
buffered_before_play
(
_buffered_before_play
),
replay_gain_config
(
_replay_gain_config
)
{
}
...
...
src/player/Control.hxx
View file @
cd4bb444
...
...
@@ -169,7 +169,7 @@ struct PlayerControl {
CrossFadeSettings
cross_fade
;
ReplayGainConfig
replay_gain_config
;
const
ReplayGainConfig
replay_gain_config
;
ReplayGainMode
replay_gain_mode
=
ReplayGainMode
::
OFF
;
double
total_play_time
=
0
;
...
...
@@ -186,7 +186,8 @@ struct PlayerControl {
PlayerControl
(
PlayerListener
&
_listener
,
MultipleOutputs
&
_outputs
,
unsigned
buffer_chunks
,
unsigned
buffered_before_play
);
unsigned
buffered_before_play
,
const
ReplayGainConfig
&
_replay_gain_config
);
~
PlayerControl
();
/**
...
...
@@ -468,10 +469,8 @@ public:
return
cross_fade
.
mixramp_delay
;
}
void
LockSetReplayGain
(
const
ReplayGainConfig
&
_config
,
ReplayGainMode
_mode
)
{
void
LockSetReplayGainMode
(
ReplayGainMode
_mode
)
{
const
ScopeLock
protect
(
mutex
);
replay_gain_config
=
_config
;
replay_gain_mode
=
_mode
;
}
...
...
test/run_output.cxx
View file @
cd4bb444
...
...
@@ -53,10 +53,12 @@ filter_plugin_by_name(gcc_unused const char *name)
PlayerControl
::
PlayerControl
(
PlayerListener
&
_listener
,
MultipleOutputs
&
_outputs
,
unsigned
_buffer_chunks
,
unsigned
_buffered_before_play
)
unsigned
_buffered_before_play
,
const
ReplayGainConfig
&
_replay_gain_config
)
:
listener
(
_listener
),
outputs
(
_outputs
),
buffer_chunks
(
_buffer_chunks
),
buffered_before_play
(
_buffered_before_play
)
{}
buffered_before_play
(
_buffered_before_play
),
replay_gain_config
(
_replay_gain_config
)
{}
PlayerControl
::~
PlayerControl
()
{}
static
AudioOutput
*
...
...
@@ -70,7 +72,8 @@ load_audio_output(EventLoop &event_loop, const char *name)
static
struct
PlayerControl
dummy_player_control
(
*
(
PlayerListener
*
)
nullptr
,
*
(
MultipleOutputs
*
)
nullptr
,
32
,
4
);
32
,
4
,
ReplayGainConfig
());
return
audio_output_new
(
event_loop
,
ReplayGainConfig
(),
*
param
,
*
(
MixerListener
*
)
nullptr
,
...
...
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