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
48b49e23
Commit
48b49e23
authored
Feb 17, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replay_gain: fall back to track gain if album gain is unavailable
parent
752dfb3d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
2 deletions
+19
-2
NEWS
NEWS
+1
-0
replay_gain_filter_plugin.c
src/filter/replay_gain_filter_plugin.c
+3
-2
replay_gain_info.c
src/replay_gain_info.c
+8
-0
replay_gain_info.h
src/replay_gain_info.h
+7
-0
No files found.
NEWS
View file @
48b49e23
...
@@ -72,6 +72,7 @@ ver 0.16 (20??/??/??)
...
@@ -72,6 +72,7 @@ ver 0.16 (20??/??/??)
- automatically convert to 16 bit samples
- automatically convert to 16 bit samples
* replay gain:
* replay gain:
- reimplemented as a filter plugin
- reimplemented as a filter plugin
- fall back to track gain if album gain is unavailable
* log unused/unknown block parameters
* log unused/unknown block parameters
* removed the deprecated "error_file" option
* removed the deprecated "error_file" option
* save state when stopped
* save state when stopped
...
...
src/filter/replay_gain_filter_plugin.c
View file @
48b49e23
...
@@ -184,9 +184,10 @@ replay_gain_filter_set_info(struct filter *_filter,
...
@@ -184,9 +184,10 @@ replay_gain_filter_set_info(struct filter *_filter,
struct
replay_gain_filter
*
filter
=
struct
replay_gain_filter
*
filter
=
(
struct
replay_gain_filter
*
)
_filter
;
(
struct
replay_gain_filter
*
)
_filter
;
if
(
info
!=
NULL
)
if
(
info
!=
NULL
)
{
filter
->
info
=
*
info
;
filter
->
info
=
*
info
;
else
replay_gain_info_complete
(
&
filter
->
info
);
}
else
replay_gain_info_init
(
&
filter
->
info
);
replay_gain_info_init
(
&
filter
->
info
);
replay_gain_filter_update
(
filter
);
replay_gain_filter_update
(
filter
);
...
...
src/replay_gain_info.c
View file @
48b49e23
...
@@ -35,3 +35,11 @@ replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp)
...
@@ -35,3 +35,11 @@ replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp)
return
scale
;
return
scale
;
}
}
void
replay_gain_info_complete
(
struct
replay_gain_info
*
info
)
{
if
(
!
replay_gain_tuple_defined
(
&
info
->
tuples
[
REPLAY_GAIN_ALBUM
]))
info
->
tuples
[
REPLAY_GAIN_ALBUM
]
=
info
->
tuples
[
REPLAY_GAIN_TRACK
];
}
src/replay_gain_info.h
View file @
48b49e23
...
@@ -63,4 +63,11 @@ replay_gain_tuple_defined(const struct replay_gain_tuple *tuple)
...
@@ -63,4 +63,11 @@ replay_gain_tuple_defined(const struct replay_gain_tuple *tuple)
float
float
replay_gain_tuple_scale
(
const
struct
replay_gain_tuple
*
tuple
,
float
preamp
);
replay_gain_tuple_scale
(
const
struct
replay_gain_tuple
*
tuple
,
float
preamp
);
/**
* Attempt to auto-complete missing data. In particular, if album
* information is missing, track gain is used.
*/
void
replay_gain_info_complete
(
struct
replay_gain_info
*
info
);
#endif
#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