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
0209bc4b
Commit
0209bc4b
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReplayGainGlobal: use struct ConfigData
parent
dd57b819
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
Main.cxx
src/Main.cxx
+3
-3
ReplayGainGlobal.cxx
src/ReplayGainGlobal.cxx
+6
-6
ReplayGainGlobal.hxx
src/ReplayGainGlobal.hxx
+2
-1
No files found.
src/Main.cxx
View file @
0209bc4b
...
...
@@ -135,9 +135,9 @@ struct Config {
};
static
Config
LoadConfig
()
LoadConfig
(
const
ConfigData
&
config
)
{
return
{
LoadReplayGainConfig
()};
return
{
LoadReplayGainConfig
(
config
)};
}
#ifdef ENABLE_DAEMON
...
...
@@ -494,7 +494,7 @@ try {
ParseCommandLine
(
argc
,
argv
,
options
);
#endif
const
auto
config
=
LoadConfig
();
const
auto
config
=
LoadConfig
(
GetGlobalConfig
()
);
#ifdef ENABLE_DAEMON
glue_daemonize_init
(
&
options
);
...
...
src/ReplayGainGlobal.cxx
View file @
0209bc4b
...
...
@@ -21,7 +21,7 @@
#include "ReplayGainGlobal.hxx"
#include "ReplayGainConfig.hxx"
#include "config/Param.hxx"
#include "config/
Global
.hxx"
#include "config/
Data
.hxx"
#include "util/RuntimeError.hxx"
#include <assert.h>
...
...
@@ -56,20 +56,20 @@ ParsePreamp(const ConfigParam &p)
}
ReplayGainConfig
LoadReplayGainConfig
()
LoadReplayGainConfig
(
const
ConfigData
&
config
)
{
ReplayGainConfig
replay_gain_config
;
const
auto
*
param
=
config
_get_p
aram
(
ConfigOption
::
REPLAYGAIN_PREAMP
);
const
auto
*
param
=
config
.
GetP
aram
(
ConfigOption
::
REPLAYGAIN_PREAMP
);
if
(
param
)
replay_gain_config
.
preamp
=
ParsePreamp
(
*
param
);
param
=
config
_get_p
aram
(
ConfigOption
::
REPLAYGAIN_MISSING_PREAMP
);
param
=
config
.
GetP
aram
(
ConfigOption
::
REPLAYGAIN_MISSING_PREAMP
);
if
(
param
)
replay_gain_config
.
missing_preamp
=
ParsePreamp
(
*
param
);
replay_gain_config
.
limit
=
config
_get_b
ool
(
ConfigOption
::
REPLAYGAIN_LIMIT
,
ReplayGainConfig
::
DEFAULT_LIMIT
);
replay_gain_config
.
limit
=
config
.
GetB
ool
(
ConfigOption
::
REPLAYGAIN_LIMIT
,
ReplayGainConfig
::
DEFAULT_LIMIT
);
return
replay_gain_config
;
}
src/ReplayGainGlobal.hxx
View file @
0209bc4b
...
...
@@ -22,9 +22,10 @@
#include "check.h"
struct
ConfigData
;
struct
ReplayGainConfig
;
ReplayGainConfig
LoadReplayGainConfig
();
LoadReplayGainConfig
(
const
ConfigData
&
config
);
#endif
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