diff options
author | Max Kellermann <max@duempel.org> | 2014-08-12 16:36:07 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-12 16:36:07 +0200 |
commit | 56f61a6d59cfc6a97005d85599963cafdfdeaba8 (patch) | |
tree | c5d4c15e407b5ef6213cc82808af562e2bf85c6d /src/pcm/PcmConvert.cxx | |
parent | 4d5f610029f27f0947bd590b32dbd2179ab379e9 (diff) | |
download | mpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.tar.gz mpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.tar.xz mpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.zip |
PcmConvert: Convert() returns ConstBuffer
Diffstat (limited to '')
-rw-r--r-- | src/pcm/PcmConvert.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/pcm/PcmConvert.cxx b/src/pcm/PcmConvert.cxx index ad79e60fc..ba9a691fc 100644 --- a/src/pcm/PcmConvert.cxx +++ b/src/pcm/PcmConvert.cxx @@ -117,12 +117,9 @@ PcmConvert::Close() #endif } -const void * -PcmConvert::Convert(const void *src, size_t src_size, - size_t *dest_size_r, - Error &error) +ConstBuffer<void> +PcmConvert::Convert(ConstBuffer<void> buffer, Error &error) { - ConstBuffer<void> buffer(src, src_size); AudioFormat format = src_format; if (format.format == SampleFormat::DSD) { @@ -164,6 +161,5 @@ PcmConvert::Convert(const void *src, size_t src_size, format.channels = dest_format.channels; } - *dest_size_r = buffer.size; - return buffer.data; + return buffer; } |