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
1330274f
Commit
1330274f
authored
Jan 04, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replay_gain: moved code to replay_gain_info.c
parent
0e183d3f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
54 deletions
+112
-54
Makefile.am
Makefile.am
+4
-2
flac_metadata.c
src/decoder/flac_metadata.c
+1
-1
decoder_api.c
src/decoder_api.c
+1
-0
decoder_api.h
src/decoder_api.h
+1
-1
decoder_thread.c
src/decoder_thread.c
+1
-0
replay_gain.c
src/replay_gain.c
+0
-23
replay_gain.h
src/replay_gain.h
+3
-26
replay_gain_info.c
src/replay_gain_info.c
+48
-0
replay_gain_info.h
src/replay_gain_info.h
+52
-0
replay_gain_state.h
src/replay_gain_state.h
+1
-1
No files found.
Makefile.am
View file @
1330274f
...
...
@@ -169,6 +169,7 @@ mpd_headers = \
src/queue_print.h
\
src/queue_save.h
\
src/replay_gain.h
\
src/replay_gain_info.h
\
src/replay_gain_state.h
\
src/sig_handlers.h
\
src/song.h
\
...
...
@@ -296,6 +297,7 @@ src_mpd_SOURCES = \
src/queue_print.c
\
src/queue_save.c
\
src/replay_gain.c
\
src/replay_gain_info.c
\
src/replay_gain_state.c
\
src/sig_handlers.c
\
src/song.c
\
...
...
@@ -830,7 +832,7 @@ test_run_decoder_LDADD = $(MPD_LIBS) \
test_run_decoder_SOURCES
=
test
/run_decoder.c
\
src/conf.c src/tokenizer.c src/utils.c src/log.c
\
src/tag.c src/tag_pool.c
\
src/replay_gain.c
\
src/replay_gain
_info
.c
\
src/uri.c
\
src/fd_util.c
\
src/audio_check.c
\
...
...
@@ -853,7 +855,7 @@ test_read_tags_LDADD = $(MPD_LIBS) \
test_read_tags_SOURCES
=
test
/read_tags.c
\
src/conf.c src/tokenizer.c src/utils.c src/log.c
\
src/tag.c src/tag_pool.c
\
src/replay_gain.c
\
src/replay_gain
_info
.c
\
src/uri.c
\
src/fd_util.c
\
src/audio_check.c
\
...
...
src/decoder/flac_metadata.c
View file @
1330274f
...
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "flac_metadata.h"
#include "replay_gain.h"
#include "replay_gain
_info
.h"
#include "tag.h"
#include <glib.h>
...
...
src/decoder_api.c
View file @
1330274f
...
...
@@ -28,6 +28,7 @@
#include "pipe.h"
#include "chunk.h"
#include "replay_gain_state.h"
#include "replay_gain.h"
#include <glib.h>
...
...
src/decoder_api.h
View file @
1330274f
...
...
@@ -31,7 +31,7 @@
#include "decoder_command.h"
#include "decoder_plugin.h"
#include "input_stream.h"
#include "replay_gain.h"
#include "replay_gain
_info
.h"
#include "tag.h"
#include "audio_format.h"
#include "conf.h"
...
...
src/decoder_thread.c
View file @
1330274f
...
...
@@ -32,6 +32,7 @@
#include "path.h"
#include "uri.h"
#include "replay_gain_state.h"
#include "replay_gain.h"
#include <glib.h>
...
...
src/replay_gain.c
View file @
1330274f
...
...
@@ -127,26 +127,3 @@ void replay_gain_global_init(void)
replay_gain_missing_preamp
=
pow
(
10
,
f
/
20
.
0
);
}
}
struct
replay_gain_info
*
replay_gain_info_new
(
void
)
{
struct
replay_gain_info
*
ret
=
g_new
(
struct
replay_gain_info
,
1
);
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
ret
->
tuples
);
++
i
)
{
ret
->
tuples
[
i
].
gain
=
0
.
0
;
ret
->
tuples
[
i
].
peak
=
0
.
0
;
}
return
ret
;
}
struct
replay_gain_info
*
replay_gain_info_dup
(
const
struct
replay_gain_info
*
src
)
{
return
g_memdup
(
src
,
sizeof
(
*
src
));
}
void
replay_gain_info_free
(
struct
replay_gain_info
*
info
)
{
g_free
(
info
);
}
src/replay_gain.h
View file @
1330274f
...
...
@@ -23,38 +23,15 @@
#ifndef MPD_REPLAY_GAIN_H
#define MPD_REPLAY_GAIN_H
#include <stdbool.h>
#include "check.h"
#include "replay_gain_info.h"
enum
replay_gain_mode
{
REPLAY_GAIN_OFF
=
-
1
,
REPLAY_GAIN_ALBUM
,
REPLAY_GAIN_TRACK
,
};
#include <stdbool.h>
extern
enum
replay_gain_mode
replay_gain_mode
;
extern
float
replay_gain_preamp
;
extern
float
replay_gain_missing_preamp
;
struct
replay_gain_tuple
{
float
gain
;
float
peak
;
};
struct
replay_gain_info
{
struct
replay_gain_tuple
tuples
[
2
];
};
struct
replay_gain_info
*
replay_gain_info_new
(
void
);
/**
* Duplicate a #replay_gain_info object.
*/
struct
replay_gain_info
*
replay_gain_info_dup
(
const
struct
replay_gain_info
*
src
);
void
replay_gain_info_free
(
struct
replay_gain_info
*
info
);
void
replay_gain_global_init
(
void
);
/**
...
...
src/replay_gain_info.c
0 → 100644
View file @
1330274f
/*
* Copyright (C) 2003-2010 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "replay_gain_info.h"
#include <glib.h>
struct
replay_gain_info
*
replay_gain_info_new
(
void
)
{
struct
replay_gain_info
*
ret
=
g_new
(
struct
replay_gain_info
,
1
);
for
(
unsigned
i
=
0
;
i
<
G_N_ELEMENTS
(
ret
->
tuples
);
++
i
)
{
ret
->
tuples
[
i
].
gain
=
0
.
0
;
ret
->
tuples
[
i
].
peak
=
0
.
0
;
}
return
ret
;
}
struct
replay_gain_info
*
replay_gain_info_dup
(
const
struct
replay_gain_info
*
src
)
{
return
g_memdup
(
src
,
sizeof
(
*
src
));
}
void
replay_gain_info_free
(
struct
replay_gain_info
*
info
)
{
g_free
(
info
);
}
src/replay_gain_info.h
0 → 100644
View file @
1330274f
/*
* Copyright (C) 2003-2010 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_REPLAY_GAIN_INFO_H
#define MPD_REPLAY_GAIN_INFO_H
#include "check.h"
enum
replay_gain_mode
{
REPLAY_GAIN_OFF
=
-
1
,
REPLAY_GAIN_ALBUM
,
REPLAY_GAIN_TRACK
,
};
struct
replay_gain_tuple
{
float
gain
;
float
peak
;
};
struct
replay_gain_info
{
struct
replay_gain_tuple
tuples
[
2
];
};
struct
replay_gain_info
*
replay_gain_info_new
(
void
);
/**
* Duplicate a #replay_gain_info object.
*/
struct
replay_gain_info
*
replay_gain_info_dup
(
const
struct
replay_gain_info
*
src
);
void
replay_gain_info_free
(
struct
replay_gain_info
*
info
);
#endif
src/replay_gain_state.h
View file @
1330274f
...
...
@@ -21,7 +21,7 @@
#define MPD_REPLAY_GAIN_STATE_H
#include "check.h"
#include "replay_gain.h"
#include "replay_gain
_info
.h"
#include <stddef.h>
...
...
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