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
d6b0ecac
Commit
d6b0ecac
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/run_filter: use struct ConfigData
parent
61a119b6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
run_filter.cxx
test/run_filter.cxx
+7
-8
No files found.
test/run_filter.cxx
View file @
d6b0ecac
...
...
@@ -19,7 +19,8 @@
#include "config.h"
#include "config/Param.hxx"
#include "config/Global.hxx"
#include "config/Data.hxx"
#include "config/File.hxx"
#include "fs/Path.hxx"
#include "AudioParser.hxx"
#include "AudioFormat.hxx"
...
...
@@ -50,9 +51,9 @@ mixer_set_volume(gcc_unused Mixer *mixer,
}
static
std
::
unique_ptr
<
PreparedFilter
>
load_filter
(
const
char
*
name
)
LoadFilter
(
const
ConfigData
&
config
,
const
char
*
name
)
{
const
auto
*
param
=
config
_find_b
lock
(
ConfigBlockOption
::
AUDIO_FILTER
,
const
auto
*
param
=
config
.
FindB
lock
(
ConfigBlockOption
::
AUDIO_FILTER
,
"name"
,
name
);
if
(
param
==
NULL
)
throw
FormatRuntimeError
(
"No such configured filter: %s"
,
...
...
@@ -76,8 +77,8 @@ try {
/* read configuration file (mpd.conf) */
config_global_init
()
;
ReadConfigFile
(
config_path
);
ConfigData
config
;
ReadConfigFile
(
config
,
config
_path
);
/* parse the audio format */
...
...
@@ -86,7 +87,7 @@ try {
/* initialize the filter */
auto
prepared_filter
=
load_filter
(
argv
[
2
]);
auto
prepared_filter
=
LoadFilter
(
config
,
argv
[
2
]);
/* open the filter */
...
...
@@ -118,8 +119,6 @@ try {
/* cleanup and exit */
config_global_finish
();
return
EXIT_SUCCESS
;
}
catch
(...)
{
PrintException
(
std
::
current_exception
());
...
...
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