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:
@@ -86,6 +86,15 @@ try {
|
||||
output.size);
|
||||
}
|
||||
|
||||
while (true) {
|
||||
auto output = state.Flush();
|
||||
if (output.IsNull())
|
||||
break;
|
||||
|
||||
gcc_unused ssize_t ignored = write(1, output.data,
|
||||
output.size);
|
||||
}
|
||||
|
||||
state.Close();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
Reference in New Issue
Block a user