filter/Filter: add method ReadMore()

This allows FilterPCM() to return more data, which some
implementations may need to do (e.g. FFmpeg).
This commit is contained in:
Max Kellermann
2021-08-26 14:20:36 +02:00
committed by Max Kellermann
parent d8bb833ba3
commit 849c4012c0
8 changed files with 84 additions and 10 deletions

View File

@@ -122,8 +122,9 @@ try {
if (nbytes == 0)
break;
auto dest = filter->FilterPCM(std::span{buffer}.first(nbytes));
output_fd.FullWrite(dest);
for (auto dest = filter->FilterPCM(std::span{buffer}.first(nbytes));
!dest.empty(); dest = filter->ReadMore())
output_fd.FullWrite(dest);
}
while (true) {