You need to sign in or sign up before continuing.
Commit 8088469e authored by Max Kellermann's avatar Max Kellermann

pcm/Convert: add method Reset()

parent 3dcb0820
...@@ -117,6 +117,17 @@ PcmConvert::Close() ...@@ -117,6 +117,17 @@ PcmConvert::Close()
#endif #endif
} }
void
PcmConvert::Reset()
{
if (enable_resampler)
resampler.Reset();
#ifdef ENABLE_DSD
dsd.Reset();
#endif
}
ConstBuffer<void> ConstBuffer<void>
PcmConvert::Convert(ConstBuffer<void> buffer) PcmConvert::Convert(ConstBuffer<void> buffer)
{ {
......
...@@ -68,6 +68,11 @@ public: ...@@ -68,6 +68,11 @@ public:
void Close(); void Close();
/** /**
* Reset the filter's state, e.g. drop/flush buffers.
*/
void Reset();
/**
* Converts PCM data between two audio formats. * Converts PCM data between two audio formats.
* *
* Throws std::runtime_error on error. * Throws std::runtime_error on error.
......
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