Commit eb8922f3 authored by Max Kellermann's avatar Max Kellermann

test/{read_conf,run_filter}: convert to C++

parent 84eb9546
......@@ -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 \
......
......@@ -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>
......
......@@ -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
......@@ -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
/*
* 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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment