diff options
author | Max Kellermann <max@duempel.org> | 2014-08-12 21:40:06 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-12 22:19:53 +0200 |
commit | 0e756e43774ef95ea9685e57f0c51331a9a7d1dc (patch) | |
tree | 8f935d93255755193ce3ae2473cbdf693a8c385a /src/output/plugins | |
parent | ee7282ce0ddb85e4e0d8174a8db6d3853b2b41a5 (diff) | |
download | mpd-0e756e43774ef95ea9685e57f0c51331a9a7d1dc.tar.gz mpd-0e756e43774ef95ea9685e57f0c51331a9a7d1dc.tar.xz mpd-0e756e43774ef95ea9685e57f0c51331a9a7d1dc.zip |
PcmExport: use class ConstBuffer
Diffstat (limited to '')
-rw-r--r-- | src/output/plugins/AlsaOutputPlugin.cxx | 5 | ||||
-rw-r--r-- | src/output/plugins/OssOutputPlugin.cxx | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index f798bac63..a66561f0b 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -25,6 +25,7 @@ #include "util/Manual.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" +#include "util/ConstBuffer.hxx" #include "Log.hxx" #include <alsa/asoundlib.h> @@ -809,7 +810,9 @@ alsa_play(AudioOutput *ao, const void *chunk, size_t size, } } - chunk = ad->pcm_export->Export(chunk, size, size); + const auto e = ad->pcm_export->Export({chunk, size}); + chunk = e.data; + size = e.size; assert(size % ad->out_frame_size == 0); diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index 05b14b29f..f2618491c 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -22,6 +22,7 @@ #include "../OutputAPI.hxx" #include "mixer/MixerList.hxx" #include "system/fd_util.h" +#include "util/ConstBuffer.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "util/Macros.hxx" @@ -728,7 +729,9 @@ oss_output_play(AudioOutput *ao, const void *chunk, size_t size, return 0; #ifdef AFMT_S24_PACKED - chunk = od->pcm_export->Export(chunk, size, size); + const auto e = od->pcm_export->Export({chunk, size}); + chunk = e.data; + size = e.size; #endif while (true) { |