aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AudioCompress/compress.h9
-rw-r--r--src/AudioConfig.cxx (renamed from src/audio_config.c)6
-rw-r--r--src/AudioConfig.hxx (renamed from src/audio_config.h)4
-rw-r--r--src/AudioParser.cxx (renamed from src/audio_parser.c)2
-rw-r--r--src/AudioParser.hxx (renamed from src/audio_parser.h)16
-rw-r--r--src/DecoderAPI.cxx6
-rw-r--r--src/Main.cxx2
-rw-r--r--src/OutputInit.cxx2
-rw-r--r--src/audio_check.h8
9 files changed, 28 insertions, 27 deletions
diff --git a/src/AudioCompress/compress.h b/src/AudioCompress/compress.h
index 073d4af9a..8556d16be 100644
--- a/src/AudioCompress/compress.h
+++ b/src/AudioCompress/compress.h
@@ -19,6 +19,10 @@ struct CompressorConfig {
struct Compressor;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
//! Create a new compressor (use history value of 0 for default)
struct Compressor *Compressor_new(unsigned int history);
@@ -34,7 +38,12 @@ struct CompressorConfig *Compressor_getConfig(struct Compressor *);
//! Process 16-bit signed data
void Compressor_Process_int16(struct Compressor *, int16_t *data, unsigned int count);
+#ifdef __cplusplus
+}
+#endif
+
//! TODO: Compressor_Process_int32, Compressor_Process_float, others as needed
//! TODO: functions for getting at the peak/gain/clip history buffers (for monitoring)
+
#endif
diff --git a/src/audio_config.c b/src/AudioConfig.cxx
index bae3c184b..e546aed27 100644
--- a/src/audio_config.c
+++ b/src/AudioConfig.cxx
@@ -18,14 +18,12 @@
*/
#include "config.h"
-#include "audio_config.h"
+#include "AudioConfig.hxx"
#include "audio_format.h"
-#include "audio_parser.h"
+#include "AudioParser.hxx"
#include "conf.h"
#include "mpd_error.h"
-#include <glib.h>
-
static struct audio_format configured_audio_format;
void getOutputAudioFormat(const struct audio_format *inAudioFormat,
diff --git a/src/audio_config.h b/src/AudioConfig.hxx
index fe43dbbcf..717a8e2e7 100644
--- a/src/audio_config.h
+++ b/src/AudioConfig.hxx
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_AUDIO_CONFIG_H
-#define MPD_AUDIO_CONFIG_H
+#ifndef MPD_AUDIO_CONFIG_HXX
+#define MPD_AUDIO_CONFIG_HXX
struct audio_format;
diff --git a/src/audio_parser.c b/src/AudioParser.cxx
index 152eab5d4..9178c3e1a 100644
--- a/src/audio_parser.c
+++ b/src/AudioParser.cxx
@@ -23,7 +23,7 @@
*/
#include "config.h"
-#include "audio_parser.h"
+#include "AudioParser.hxx"
#include "audio_format.h"
#include "audio_check.h"
#include "gcc.h"
diff --git a/src/audio_parser.h b/src/AudioParser.hxx
index bbe868f61..f7855e8e3 100644
--- a/src/audio_parser.h
+++ b/src/AudioParser.hxx
@@ -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
@@ -22,19 +22,13 @@
* Parser functions for audio related objects.
*/
-#ifndef AUDIO_PARSER_H
-#define AUDIO_PARSER_H
+#ifndef MPD_AUDIO_PARSER_HXX
+#define MPD_AUDIO_PARSER_HXX
#include "gerror.h"
-#include <stdbool.h>
-
struct audio_format;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* Parses a string in the form "SAMPLE_RATE:BITS:CHANNELS" into an
* #audio_format.
@@ -50,8 +44,4 @@ bool
audio_format_parse(struct audio_format *dest, const char *src,
bool mask, GError **error_r);
-#ifdef __cplusplus
-}
-#endif
-
#endif
diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx
index 29b39688f..b68af19bb 100644
--- a/src/DecoderAPI.cxx
+++ b/src/DecoderAPI.cxx
@@ -19,11 +19,7 @@
#include "config.h"
#include "decoder_api.h"
-
-extern "C" {
-#include "audio_config.h"
-}
-
+#include "AudioConfig.hxx"
#include "replay_gain_config.h"
#include "MusicChunk.hxx"
#include "MusicBuffer.hxx"
diff --git a/src/Main.cxx b/src/Main.cxx
index a22ee6313..63a78d0e4 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -51,11 +51,11 @@
#include "PlaylistRegistry.hxx"
#include "ZeroconfGlue.hxx"
#include "DecoderList.hxx"
+#include "AudioConfig.hxx"
extern "C" {
#include "daemon.h"
#include "stats.h"
-#include "audio_config.h"
#include "pcm_resample.h"
}
diff --git a/src/OutputInit.cxx b/src/OutputInit.cxx
index dfb246a08..0d3dd05ad 100644
--- a/src/OutputInit.cxx
+++ b/src/OutputInit.cxx
@@ -22,10 +22,10 @@
#include "OutputList.hxx"
#include "FilterConfig.hxx"
#include "output_api.h"
+#include "AudioParser.hxx"
extern "C" {
#include "output_internal.h"
-#include "audio_parser.h"
#include "mixer_control.h"
#include "mixer_type.h"
#include "mixer_list.h"
diff --git a/src/audio_check.h b/src/audio_check.h
index e2302126f..d4d3f13fd 100644
--- a/src/audio_check.h
+++ b/src/audio_check.h
@@ -35,6 +35,10 @@ audio_format_quark(void)
return g_quark_from_static_string("audio_format");
}
+#ifdef __cplusplus
+extern "C" {
+#endif
+
bool
audio_check_sample_rate(unsigned long sample_rate, GError **error_r);
@@ -52,4 +56,8 @@ audio_format_init_checked(struct audio_format *af, unsigned long sample_rate,
enum sample_format sample_format, unsigned channels,
GError **error_r);
+#ifdef __cplusplus
+}
+#endif
+
#endif