From 0e756e43774ef95ea9685e57f0c51331a9a7d1dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Aug 2014 21:40:06 +0200 Subject: PcmExport: use class ConstBuffer --- src/output/plugins/AlsaOutputPlugin.cxx | 5 ++++- src/output/plugins/OssOutputPlugin.cxx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/output/plugins') 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 @@ -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) { -- cgit v1.2.3