diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-05 10:10:17 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-05 10:10:17 +0100 |
commit | 4a120f80902efcab53ebabbc03266ba3487374fd (patch) | |
tree | f1db5632e79adb13c3f9e3c9cc45092bc6cedb6d /src/pcm | |
parent | 79b0f97a3fb064b2849b4c6870444a66b1e6e886 (diff) | |
parent | c2cbb7b8cecca575ce09aeb04fd1436d44cf9519 (diff) |
Merge branch 'v0.20.x'
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/SoxrResampler.cxx | 8 | ||||
-rw-r--r-- | src/pcm/SoxrResampler.hxx | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/pcm/SoxrResampler.cxx b/src/pcm/SoxrResampler.cxx index 6dc80f416..90a7d58a5 100644 --- a/src/pcm/SoxrResampler.cxx +++ b/src/pcm/SoxrResampler.cxx @@ -139,6 +139,14 @@ SoxrPcmResampler::Close() noexcept soxr_delete(soxr); } +void +SoxrPcmResampler::Reset() noexcept +{ +#if SOXR_THIS_VERSION >= SOXR_VERSION(0,1,2) + soxr_clear(soxr); +#endif +} + ConstBuffer<void> SoxrPcmResampler::Resample(ConstBuffer<void> src) { diff --git a/src/pcm/SoxrResampler.hxx b/src/pcm/SoxrResampler.hxx index 8df36c959..735a24a85 100644 --- a/src/pcm/SoxrResampler.hxx +++ b/src/pcm/SoxrResampler.hxx @@ -41,6 +41,7 @@ class SoxrPcmResampler final : public PcmResampler { public: AudioFormat Open(AudioFormat &af, unsigned new_sample_rate) override; void Close() noexcept override; + void Reset() noexcept override; ConstBuffer<void> Resample(ConstBuffer<void> src) override; ConstBuffer<void> Flush() override; }; |