Commit 91e565d9 authored by Max Kellermann's avatar Max Kellermann

pcm/PcmFormat: use transform_n()

parent a189a9e4
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "FloatConvert.hxx" #include "FloatConvert.hxx"
#include "ShiftConvert.hxx" #include "ShiftConvert.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "util/TransformN.hxx"
#include "Dither.cxx" // including the .cxx file to get inlined templates #include "Dither.cxx" // including the .cxx file to get inlined templates
...@@ -38,8 +39,7 @@ struct PerSampleConvert : C { ...@@ -38,8 +39,7 @@ struct PerSampleConvert : C {
void Convert(typename DstTraits::pointer_type gcc_restrict out, void Convert(typename DstTraits::pointer_type gcc_restrict out,
typename SrcTraits::const_pointer_type gcc_restrict in, typename SrcTraits::const_pointer_type gcc_restrict in,
size_t n) const { size_t n) const {
for (size_t i = 0; i != n; ++i) transform_n(in, n, out, C::Convert);
out[i] = C::Convert(in[i]);
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment