aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--src/filter/ReplayGainFilterPlugin.cxx2
-rw-r--r--src/filter_plugin.h8
-rw-r--r--src/mixer_control.h8
-rw-r--r--test/read_conf.cxx (renamed from test/read_conf.c)2
-rw-r--r--test/run_filter.cxx (renamed from test/run_filter.c)6
6 files changed, 25 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 1b0124066..b544488dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1045,7 +1045,7 @@ endif
test_read_conf_LDADD = \
$(GLIB_LIBS)
-test_read_conf_SOURCES = test/read_conf.c \
+test_read_conf_SOURCES = test/read_conf.cxx \
src/ConfigFile.cxx src/tokenizer.c src/utils.c src/string_util.c
test_run_resolver_LDADD = \
@@ -1183,7 +1183,7 @@ endif
test_run_filter_LDADD = \
$(FILTER_LIBS) \
$(GLIB_LIBS)
-test_run_filter_SOURCES = test/run_filter.c \
+test_run_filter_SOURCES = test/run_filter.cxx \
test/FakeReplayGainConfig.cxx \
test/stdbin.h \
src/filter_plugin.c \
diff --git a/src/filter/ReplayGainFilterPlugin.cxx b/src/filter/ReplayGainFilterPlugin.cxx
index 1c2f40260..f4b1f92ee 100644
--- a/src/filter/ReplayGainFilterPlugin.cxx
+++ b/src/filter/ReplayGainFilterPlugin.cxx
@@ -25,11 +25,11 @@
#include "audio_format.h"
#include "replay_gain_info.h"
#include "replay_gain_config.h"
+#include "mixer_control.h"
extern "C" {
#include "pcm_buffer.h"
#include "pcm_volume.h"
-#include "mixer_control.h"
}
#include <assert.h>
diff --git a/src/filter_plugin.h b/src/filter_plugin.h
index d45faee1f..ae14a245c 100644
--- a/src/filter_plugin.h
+++ b/src/filter_plugin.h
@@ -74,6 +74,10 @@ struct filter_plugin {
GError **error_r);
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* 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,
size_t *dest_size_r,
GError **error_r);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mixer_control.h b/src/mixer_control.h
index 307298e47..46219e5dd 100644
--- a/src/mixer_control.h
+++ b/src/mixer_control.h
@@ -33,6 +33,10 @@ struct mixer;
struct mixer_plugin;
struct config_param;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct mixer *
mixer_new(const struct mixer_plugin *plugin, void *ao,
const struct config_param *param,
@@ -60,4 +64,8 @@ mixer_get_volume(struct mixer *mixer, GError **error_r);
bool
mixer_set_volume(struct mixer *mixer, unsigned volume, GError **error_r);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/test/read_conf.c b/test/read_conf.cxx
index 4f6005c6f..859c8949d 100644
--- a/test/read_conf.c
+++ b/test/read_conf.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
diff --git a/test/run_filter.c b/test/run_filter.cxx
index 7a4bd9d80..990a57df0 100644
--- a/test/run_filter.c
+++ b/test/run_filter.cxx
@@ -19,7 +19,11 @@
#include "config.h"
#include "conf.h"
+
+extern "C" {
#include "audio_parser.h"
+}
+
#include "audio_format.h"
#include "filter_plugin.h"
#include "pcm_volume.h"
@@ -75,7 +79,7 @@ load_filter(const char *name)
param = find_named_config_block("filter", name);
if (param == NULL) {
g_printerr("No such configured filter: %s\n", name);
- return false;
+ return nullptr;
}
filter = filter_configured_new(param, &error);