aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmDsd.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-29 07:56:40 +0200
committerMax Kellermann <max@duempel.org>2013-07-29 07:56:40 +0200
commitcac3c159bc84d5163c87a40383d3eda64a4c9f69 (patch)
tree06e9e4f965ba69b1a415ec1941e238b8a11565cb /src/pcm/PcmDsd.hxx
parent43166130b51e995ada4130f6400efbb5d38eeb47 (diff)
downloadmpd-cac3c159bc84d5163c87a40383d3eda64a4c9f69.tar.gz
mpd-cac3c159bc84d5163c87a40383d3eda64a4c9f69.tar.xz
mpd-cac3c159bc84d5163c87a40383d3eda64a4c9f69.zip
pcm_dsd: convert to C++
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmDsd.hxx (renamed from src/pcm/pcm_dsd.h)28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/pcm/pcm_dsd.h b/src/pcm/PcmDsd.hxx
index 85c2455aa..ef71411e9 100644
--- a/src/pcm/pcm_dsd.h
+++ b/src/pcm/PcmDsd.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2012 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
@@ -17,36 +17,30 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_PCM_DSD_H
-#define MPD_PCM_DSD_H
+#ifndef MPD_PCM_DSD_HXX
+#define MPD_PCM_DSD_HXX
#include "check.h"
#include "pcm_buffer.h"
-#include <stdbool.h>
#include <stdint.h>
/**
* Wrapper for the dsd2pcm library.
*/
-struct pcm_dsd {
+struct PcmDsd {
struct pcm_buffer buffer;
struct dsd2pcm_ctx_s *dsd2pcm[32];
-};
-
-void
-pcm_dsd_init(struct pcm_dsd *dsd);
-void
-pcm_dsd_deinit(struct pcm_dsd *dsd);
+ PcmDsd();
+ ~PcmDsd();
-void
-pcm_dsd_reset(struct pcm_dsd *dsd);
+ void Reset();
-const float *
-pcm_dsd_to_float(struct pcm_dsd *dsd, unsigned channels, bool lsbfirst,
- const uint8_t *src, size_t src_size,
- size_t *dest_size_r);
+ const float *ToFloat(unsigned channels, bool lsbfirst,
+ const uint8_t *src, size_t src_size,
+ size_t *dest_size_r);
+};
#endif