Commit c68ed406 authored by Max Kellermann's avatar Max Kellermann

pcm/SoxrResampler: implement method Reset()

parent ff624075
ver 0.20.15 (not yet released)
* resampler
- soxr: clear internal state after manual song change
* state file
- make mount point restore errors non-fatal
- fix crash when restoring mounts with incompatible database plugin
......
......@@ -139,6 +139,14 @@ SoxrPcmResampler::Close()
soxr_delete(soxr);
}
void
SoxrPcmResampler::Reset()
{
#if SOXR_THIS_VERSION >= SOXR_VERSION(0,1,2)
soxr_clear(soxr);
#endif
}
ConstBuffer<void>
SoxrPcmResampler::Resample(ConstBuffer<void> src)
{
......
......@@ -41,6 +41,7 @@ class SoxrPcmResampler final : public PcmResampler {
public:
AudioFormat Open(AudioFormat &af, unsigned new_sample_rate) override;
void Close() override;
void Reset() override;
ConstBuffer<void> Resample(ConstBuffer<void> src) override;
};
......
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