filter/Filter: add virtual method Flush()

This will be used by filters which have internal buffers which need to
be flushed at the end, e.g. the "soxr" resampler.
This commit is contained in:
Max Kellermann
2018-01-01 19:22:45 +01:00
parent 14f669f4fb
commit 6d0d8cf9cf
9 changed files with 134 additions and 7 deletions

View File

@@ -62,6 +62,12 @@ public:
* or Reset() call)
*/
virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src) = 0;
/**
* Flush pending data and return it. This should be called
* repepatedly until it returns nullptr.
*/
virtual ConstBuffer<void> Flush();
};
#endif