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:
@@ -244,3 +244,11 @@ AudioOutputSource::ConsumeData(size_t nbytes) noexcept
|
||||
if (pending_data.empty())
|
||||
pipe.Consume(*std::exchange(current_chunk, nullptr));
|
||||
}
|
||||
|
||||
ConstBuffer<void>
|
||||
AudioOutputSource::Flush()
|
||||
{
|
||||
return filter
|
||||
? filter->Flush()
|
||||
: nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user