pcm/SoxrResampler: implement method Reset()
This commit is contained in:
parent
ff624075a8
commit
c68ed40661
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
|||
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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue