audio_{parser,config}: convert to C++
This commit is contained in:
@@ -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
|
||||
|
@@ -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,
|
@@ -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;
|
||||
|
@@ -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"
|
@@ -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
|
@@ -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"
|
||||
|
@@ -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"
|
||||
}
|
||||
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user