diff options
author | Max Kellermann <max@duempel.org> | 2014-03-14 20:04:28 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-14 20:53:14 +0100 |
commit | 9fa6fa522e5642df8898574636ef10c8cf0349e3 (patch) | |
tree | 6b2eeca8a24ac318fa9372ea23f01afcc6ea4557 /src/pcm | |
parent | d0cd98a63aa40ba16946148590d3cf0648a1dd19 (diff) | |
download | mpd-9fa6fa522e5642df8898574636ef10c8cf0349e3.tar.gz mpd-9fa6fa522e5642df8898574636ef10c8cf0349e3.tar.xz mpd-9fa6fa522e5642df8898574636ef10c8cf0349e3.zip |
pcm/PcmFormat: remove obsolete AllocateFromFloat() overload
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/PcmFormat.cxx | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/pcm/PcmFormat.cxx b/src/pcm/PcmFormat.cxx index 248443c81..bbd3eb6f5 100644 --- a/src/pcm/PcmFormat.cxx +++ b/src/pcm/PcmFormat.cxx @@ -71,21 +71,6 @@ ConvertFromFloat(typename Traits::pointer_type dest, } template<SampleFormat F, class Traits=SampleTraits<F>> -static typename Traits::pointer_type -AllocateFromFloat(PcmBuffer &buffer, const float *src, size_t src_size, - size_t *dest_size_r) -{ - constexpr size_t src_sample_size = sizeof(*src); - assert(src_size % src_sample_size == 0); - - const size_t num_samples = src_size / src_sample_size; - *dest_size_r = num_samples * sizeof(typename Traits::value_type); - auto dest = (typename Traits::pointer_type)buffer.Get(*dest_size_r); - ConvertFromFloat<F, Traits>(dest, src, src_size / sizeof(*src)); - return dest; -} - -template<SampleFormat F, class Traits=SampleTraits<F>> static WritableBuffer<typename Traits::value_type> AllocateFromFloat(PcmBuffer &buffer, ConstBuffer<float> src) { |