output/Source: convert runtime check to assert()

Flush() may only be called if the source is open.
This commit is contained in:
Max Kellermann 2024-11-08 19:09:10 +01:00
parent 4d8a2ea688
commit d8bb833ba3
1 changed files with 3 additions and 3 deletions

View File

@ -240,7 +240,7 @@ AudioOutputSource::ConsumeData(size_t nbytes) noexcept
std::span<const std::byte> std::span<const std::byte>
AudioOutputSource::Flush() AudioOutputSource::Flush()
{ {
return filter assert(filter);
? filter->Flush()
: std::span<const std::byte>{}; return filter->Flush();
} }