aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmDsd.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-29 08:10:10 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 08:31:02 +0200
commitc75cb67c4406648314ce2a15daf8b632374d7913 (patch)
tree5e27b73f2c90e878631bfac5b60070505b094717 /src/pcm/PcmDsd.cxx
parentcd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5 (diff)
downloadmpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.gz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.xz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.zip
pcm_buffer: convert to C++
Diffstat (limited to 'src/pcm/PcmDsd.cxx')
-rw-r--r--src/pcm/PcmDsd.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pcm/PcmDsd.cxx b/src/pcm/PcmDsd.cxx
index fb2dfd033..e2f5aac20 100644
--- a/src/pcm/PcmDsd.cxx
+++ b/src/pcm/PcmDsd.cxx
@@ -29,15 +29,11 @@
PcmDsd::PcmDsd()
{
- pcm_buffer_init(&buffer);
-
std::fill_n(dsd2pcm, G_N_ELEMENTS(dsd2pcm), nullptr);
}
PcmDsd::~PcmDsd()
{
- pcm_buffer_deinit(&buffer);
-
for (unsigned i = 0; i < G_N_ELEMENTS(dsd2pcm); ++i)
if (dsd2pcm[i] != nullptr)
dsd2pcm_destroy(dsd2pcm[i]);
@@ -67,7 +63,7 @@ PcmDsd::ToFloat(unsigned channels, bool lsbfirst,
float *dest;
const size_t dest_size = num_samples * sizeof(*dest);
*dest_size_r = dest_size;
- dest = (float *)pcm_buffer_get(&buffer, dest_size);
+ dest = (float *)buffer.Get(dest_size);
for (unsigned c = 0; c < channels; ++c) {
if (dsd2pcm[c] == nullptr) {