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
eb8922f3
Commit
eb8922f3
authored
Jan 29, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/{read_conf,run_filter}: convert to C++
parent
84eb9546
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
5 deletions
+25
-5
Makefile.am
Makefile.am
+2
-2
ReplayGainFilterPlugin.cxx
src/filter/ReplayGainFilterPlugin.cxx
+1
-1
filter_plugin.h
src/filter_plugin.h
+8
-0
mixer_control.h
src/mixer_control.h
+8
-0
read_conf.cxx
test/read_conf.cxx
+1
-1
run_filter.cxx
test/run_filter.cxx
+5
-1
No files found.
Makefile.am
View file @
eb8922f3
...
@@ -1045,7 +1045,7 @@ endif
...
@@ -1045,7 +1045,7 @@ endif
test_read_conf_LDADD
=
\
test_read_conf_LDADD
=
\
$(GLIB_LIBS)
$(GLIB_LIBS)
test_read_conf_SOURCES
=
test
/read_conf.c
\
test_read_conf_SOURCES
=
test
/read_conf.c
xx
\
src/ConfigFile.cxx src/tokenizer.c src/utils.c src/string_util.c
src/ConfigFile.cxx src/tokenizer.c src/utils.c src/string_util.c
test_run_resolver_LDADD
=
\
test_run_resolver_LDADD
=
\
...
@@ -1183,7 +1183,7 @@ endif
...
@@ -1183,7 +1183,7 @@ endif
test_run_filter_LDADD
=
\
test_run_filter_LDADD
=
\
$(FILTER_LIBS)
\
$(FILTER_LIBS)
\
$(GLIB_LIBS)
$(GLIB_LIBS)
test_run_filter_SOURCES
=
test
/run_filter.c
\
test_run_filter_SOURCES
=
test
/run_filter.c
xx
\
test
/FakeReplayGainConfig.cxx
\
test
/FakeReplayGainConfig.cxx
\
test
/stdbin.h
\
test
/stdbin.h
\
src/filter_plugin.c
\
src/filter_plugin.c
\
...
...
src/filter/ReplayGainFilterPlugin.cxx
View file @
eb8922f3
...
@@ -25,11 +25,11 @@
...
@@ -25,11 +25,11 @@
#include "audio_format.h"
#include "audio_format.h"
#include "replay_gain_info.h"
#include "replay_gain_info.h"
#include "replay_gain_config.h"
#include "replay_gain_config.h"
#include "mixer_control.h"
extern
"C"
{
extern
"C"
{
#include "pcm_buffer.h"
#include "pcm_buffer.h"
#include "pcm_volume.h"
#include "pcm_volume.h"
#include "mixer_control.h"
}
}
#include <assert.h>
#include <assert.h>
...
...
src/filter_plugin.h
View file @
eb8922f3
...
@@ -74,6 +74,10 @@ struct filter_plugin {
...
@@ -74,6 +74,10 @@ struct filter_plugin {
GError
**
error_r
);
GError
**
error_r
);
};
};
#ifdef __cplusplus
extern
"C"
{
#endif
/**
/**
* Creates a new instance of the specified filter plugin.
* Creates a new instance of the specified filter plugin.
*
*
...
@@ -147,4 +151,8 @@ filter_filter(struct filter *filter, const void *src, size_t src_size,
...
@@ -147,4 +151,8 @@ filter_filter(struct filter *filter, const void *src, size_t src_size,
size_t
*
dest_size_r
,
size_t
*
dest_size_r
,
GError
**
error_r
);
GError
**
error_r
);
#ifdef __cplusplus
}
#endif
#endif
#endif
src/mixer_control.h
View file @
eb8922f3
...
@@ -33,6 +33,10 @@ struct mixer;
...
@@ -33,6 +33,10 @@ struct mixer;
struct
mixer_plugin
;
struct
mixer_plugin
;
struct
config_param
;
struct
config_param
;
#ifdef __cplusplus
extern
"C"
{
#endif
struct
mixer
*
struct
mixer
*
mixer_new
(
const
struct
mixer_plugin
*
plugin
,
void
*
ao
,
mixer_new
(
const
struct
mixer_plugin
*
plugin
,
void
*
ao
,
const
struct
config_param
*
param
,
const
struct
config_param
*
param
,
...
@@ -60,4 +64,8 @@ mixer_get_volume(struct mixer *mixer, GError **error_r);
...
@@ -60,4 +64,8 @@ mixer_get_volume(struct mixer *mixer, GError **error_r);
bool
bool
mixer_set_volume
(
struct
mixer
*
mixer
,
unsigned
volume
,
GError
**
error_r
);
mixer_set_volume
(
struct
mixer
*
mixer
,
unsigned
volume
,
GError
**
error_r
);
#ifdef __cplusplus
}
#endif
#endif
#endif
test/read_conf.c
→
test/read_conf.c
xx
View file @
eb8922f3
/*
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
...
test/run_filter.c
→
test/run_filter.c
xx
View file @
eb8922f3
...
@@ -19,7 +19,11 @@
...
@@ -19,7 +19,11 @@
#include "config.h"
#include "config.h"
#include "conf.h"
#include "conf.h"
extern
"C"
{
#include "audio_parser.h"
#include "audio_parser.h"
}
#include "audio_format.h"
#include "audio_format.h"
#include "filter_plugin.h"
#include "filter_plugin.h"
#include "pcm_volume.h"
#include "pcm_volume.h"
...
@@ -75,7 +79,7 @@ load_filter(const char *name)
...
@@ -75,7 +79,7 @@ load_filter(const char *name)
param
=
find_named_config_block
(
"filter"
,
name
);
param
=
find_named_config_block
(
"filter"
,
name
);
if
(
param
==
NULL
)
{
if
(
param
==
NULL
)
{
g_printerr
(
"No such configured filter: %s
\n
"
,
name
);
g_printerr
(
"No such configured filter: %s
\n
"
,
name
);
return
false
;
return
nullptr
;
}
}
filter
=
filter_configured_new
(
param
,
&
error
);
filter
=
filter_configured_new
(
param
,
&
error
);
...
...
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