filter/Filter: Flush() returns empty span, not nullptr
This commit is contained in:
parent
d6195025fb
commit
bcab29d53a
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush pending data and return it. This should be called
|
* Flush pending data and return it. This should be called
|
||||||
* repeatedly until it returns nullptr.
|
* repeatedly until it returns an empty span.
|
||||||
*
|
*
|
||||||
* After calling this method, this object cannot be used again
|
* After calling this method, this object cannot be used again
|
||||||
* (not even Reset() is allowed).
|
* (not even Reset() is allowed).
|
||||||
|
|
|
@ -389,7 +389,7 @@ AudioOutputControl::InternalDrain() noexcept
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
auto buffer = source.Flush();
|
auto buffer = source.Flush();
|
||||||
if (buffer.data() == nullptr)
|
if (buffer.empty())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
PlayFull(*output, buffer);
|
PlayFull(*output, buffer);
|
||||||
|
|
|
@ -128,7 +128,7 @@ try {
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
auto dest = filter->Flush();
|
auto dest = filter->Flush();
|
||||||
if (dest.data() == nullptr)
|
if (dest.empty())
|
||||||
break;
|
break;
|
||||||
output_fd.FullWrite(dest);
|
output_fd.FullWrite(dest);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue