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
3b867462
Commit
3b867462
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter/ReplayGain: remove FilterPlugin instance, add explicit constructor
parent
b8aa9348
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
15 deletions
+7
-15
FilterRegistry.cxx
src/filter/FilterRegistry.cxx
+0
-1
FilterRegistry.hxx
src/filter/FilterRegistry.hxx
+0
-1
ReplayGainFilterPlugin.cxx
src/filter/plugins/ReplayGainFilterPlugin.cxx
+2
-9
ReplayGainFilterPlugin.hxx
src/filter/plugins/ReplayGainFilterPlugin.hxx
+3
-0
Init.cxx
src/output/Init.cxx
+2
-4
No files found.
src/filter/FilterRegistry.cxx
View file @
3b867462
...
...
@@ -28,7 +28,6 @@ static const FilterPlugin *const filter_plugins[] = {
&
route_filter_plugin
,
&
normalize_filter_plugin
,
&
volume_filter_plugin
,
&
replay_gain_filter_plugin
,
nullptr
,
};
...
...
This diff is collapsed.
Click to expand it.
src/filter/FilterRegistry.hxx
View file @
3b867462
...
...
@@ -36,7 +36,6 @@ extern const FilterPlugin convert_filter_plugin;
extern
const
FilterPlugin
route_filter_plugin
;
extern
const
FilterPlugin
normalize_filter_plugin
;
extern
const
FilterPlugin
volume_filter_plugin
;
extern
const
FilterPlugin
replay_gain_filter_plugin
;
gcc_pure
const
FilterPlugin
*
...
...
This diff is collapsed.
Click to expand it.
src/filter/plugins/ReplayGainFilterPlugin.cxx
View file @
3b867462
...
...
@@ -19,9 +19,7 @@
#include "config.h"
#include "ReplayGainFilterPlugin.hxx"
#include "filter/FilterPlugin.hxx"
#include "filter/FilterInternal.hxx"
#include "filter/FilterRegistry.hxx"
#include "AudioFormat.hxx"
#include "ReplayGainInfo.hxx"
#include "ReplayGainGlobal.hxx"
...
...
@@ -163,8 +161,8 @@ ReplayGainFilter::Update()
pv
.
SetVolume
(
volume
);
}
static
PreparedFilter
*
replay_gain_filter_init
(
gcc_unused
const
ConfigBlock
&
block
)
PreparedFilter
*
NewReplayGainFilter
(
)
{
return
new
PreparedReplayGainFilter
();
}
...
...
@@ -183,11 +181,6 @@ ReplayGainFilter::FilterPCM(ConstBuffer<void> src)
:
pv
.
Apply
(
src
);
}
const
FilterPlugin
replay_gain_filter_plugin
=
{
"replay_gain"
,
replay_gain_filter_init
,
};
void
replay_gain_filter_set_mixer
(
PreparedFilter
&
_filter
,
Mixer
*
mixer
,
unsigned
base
)
...
...
This diff is collapsed.
Click to expand it.
src/filter/plugins/ReplayGainFilterPlugin.hxx
View file @
3b867462
...
...
@@ -27,6 +27,9 @@ class PreparedFilter;
class
Mixer
;
struct
ReplayGainInfo
;
PreparedFilter
*
NewReplayGainFilter
();
/**
* Enables or disables the hardware mixer for applying replay gain.
*
...
...
This diff is collapsed.
Click to expand it.
src/output/Init.cxx
View file @
3b867462
...
...
@@ -216,14 +216,12 @@ audio_output_setup(EventLoop &event_loop, AudioOutput &ao,
block
.
GetBlockValue
(
"replay_gain_handler"
,
"software"
);
if
(
strcmp
(
replay_gain_handler
,
"none"
)
!=
0
)
{
ao
.
prepared_replay_gain_filter
=
filter_new
(
&
replay_gain_filter_plugin
,
block
);
ao
.
prepared_replay_gain_filter
=
NewReplayGainFilter
();
assert
(
ao
.
prepared_replay_gain_filter
!=
nullptr
);
ao
.
replay_gain_serial
=
0
;
ao
.
prepared_other_replay_gain_filter
=
filter_new
(
&
replay_gain_filter_plugin
,
block
);
ao
.
prepared_other_replay_gain_filter
=
NewReplayGainFilter
();
assert
(
ao
.
prepared_other_replay_gain_filter
!=
nullptr
);
ao
.
other_replay_gain_serial
=
0
;
...
...
This diff is collapsed.
Click to expand it.
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