pcm/Convert: add method Reset()

This commit is contained in:
Max Kellermann 2017-01-11 15:30:30 +01:00
parent 3dcb082015
commit 8088469eca
2 changed files with 16 additions and 0 deletions

View File

@ -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)
{ {

View File

@ -67,6 +67,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.
* *