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
7ec32704
Commit
7ec32704
authored
Oct 17, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replay_gain: moved mode parser to replay_gain_set_mode_string()
parent
8d217567
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
replay_gain.c
src/replay_gain.c
+19
-6
No files found.
src/replay_gain.c
View file @
7ec32704
...
...
@@ -26,6 +26,8 @@
#include "pcm_volume.h"
#include <glib.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
...
...
@@ -40,17 +42,28 @@ enum replay_gain_mode replay_gain_mode = REPLAY_GAIN_OFF;
static
float
replay_gain_preamp
=
1
.
0
;
static
float
replay_gain_missing_preamp
=
1
.
0
;
void
replay_gain_global_init
(
void
)
static
bool
replay_gain_set_mode_string
(
const
char
*
p
)
{
const
struct
config_param
*
param
=
config_get_param
(
CONF_REPLAYGAIN
);
assert
(
p
!=
NULL
);
if
(
param
==
NULL
||
strcmp
(
param
->
value
,
"off"
)
==
0
)
{
if
(
strcmp
(
p
,
"off"
)
==
0
)
replay_gain_mode
=
REPLAY_GAIN_OFF
;
}
else
if
(
strcmp
(
param
->
value
,
"track"
)
==
0
)
{
else
if
(
strcmp
(
p
,
"track"
)
==
0
)
replay_gain_mode
=
REPLAY_GAIN_TRACK
;
}
else
if
(
strcmp
(
param
->
value
,
"album"
)
==
0
)
{
else
if
(
strcmp
(
p
,
"album"
)
==
0
)
replay_gain_mode
=
REPLAY_GAIN_ALBUM
;
}
else
{
else
return
false
;
return
true
;
}
void
replay_gain_global_init
(
void
)
{
const
struct
config_param
*
param
=
config_get_param
(
CONF_REPLAYGAIN
);
if
(
param
!=
NULL
&&
!
replay_gain_set_mode_string
(
param
->
value
))
{
g_error
(
"replaygain value
\"
%s
\"
at line %i is invalid
\n
"
,
param
->
value
,
param
->
line
);
}
...
...
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