aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmExport.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/PcmExport.cxx
parentcd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5 (diff)
downloadmpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.gz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.xz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.zip
pcm_buffer: convert to C++
Diffstat (limited to 'src/pcm/PcmExport.cxx')
-rw-r--r--src/pcm/PcmExport.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx
index a148e2873..8840dc865 100644
--- a/src/pcm/PcmExport.cxx
+++ b/src/pcm/PcmExport.cxx
@@ -78,7 +78,7 @@ const void *
PcmExport::Export(const void *data, size_t size, size_t &dest_size_r)
{
if (dsd_usb)
- data = pcm_dsd_to_usb(&dsd_buffer, channels,
+ data = pcm_dsd_to_usb(dsd_buffer, channels,
(const uint8_t *)data, size, &size);
if (pack24) {
@@ -89,8 +89,7 @@ PcmExport::Export(const void *data, size_t size, size_t &dest_size_r)
const uint8_t *src8 = (const uint8_t *)data;
const uint8_t *src_end8 = src8 + size;
- uint8_t *dest = (uint8_t *)
- pcm_buffer_get(&pack_buffer, dest_size);
+ uint8_t *dest = (uint8_t *)pack_buffer.Get(dest_size);
assert(dest != NULL);
pcm_pack_24(dest, (const int32_t *)src8,
@@ -106,8 +105,7 @@ PcmExport::Export(const void *data, size_t size, size_t &dest_size_r)
const uint32_t *src = (const uint32_t *)src8;
const uint32_t *const src_end = (const uint32_t *)src_end8;
- uint32_t *dest = (uint32_t *)
- pcm_buffer_get(&pack_buffer, size);
+ uint32_t *dest = (uint32_t *)pack_buffer.Get(size);
data = dest;
while (src < src_end)
@@ -118,8 +116,7 @@ PcmExport::Export(const void *data, size_t size, size_t &dest_size_r)
if (reverse_endian > 0) {
assert(reverse_endian >= 2);
- uint8_t *dest = (uint8_t *)
- pcm_buffer_get(&reverse_buffer, size);
+ uint8_t *dest = (uint8_t *)reverse_buffer.Get(size);
assert(dest != NULL);
const uint8_t *src = (const uint8_t *)data;