Commit 0d0642fd authored by Max Kellermann's avatar Max Kellermann

pcm/PcmFormat: instantiate FloatToInteger<S32>

.. instead of reusing FloatToInteger<S24> and converting from S24 to S32 in-place.
parent 08e6cf3d
...@@ -263,12 +263,7 @@ pcm_allocate_24p32_to_32(PcmBuffer &buffer, ConstBuffer<int32_t> src) ...@@ -263,12 +263,7 @@ pcm_allocate_24p32_to_32(PcmBuffer &buffer, ConstBuffer<int32_t> src)
static ConstBuffer<int32_t> static ConstBuffer<int32_t>
pcm_allocate_float_to_32(PcmBuffer &buffer, ConstBuffer<float> src) pcm_allocate_float_to_32(PcmBuffer &buffer, ConstBuffer<float> src)
{ {
/* convert to S24_P32 first */ return ToConst(AllocateFromFloat<SampleFormat::S32>(buffer, src));
auto dest = pcm_allocate_float_to_24(buffer, src);
/* convert to 32 bit in-place */
Convert24To32().Convert(dest.data, dest.data, src.size);
return ToConst(dest);
} }
ConstBuffer<int32_t> ConstBuffer<int32_t>
......
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