Skip to content

Commit

Permalink
output/Source: convert runtime check to assert()
Browse files Browse the repository at this point in the history
Flush() may only be called if the source is open.
  • Loading branch information
MaxKellermann committed Nov 8, 2024
1 parent 4d8a2ea commit d8bb833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/output/Source.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ AudioOutputSource::ConsumeData(size_t nbytes) noexcept
std::span<const std::byte>
AudioOutputSource::Flush()
{
return filter
? filter->Flush()
: std::span<const std::byte>{};
assert(filter);

return filter->Flush();
}

0 comments on commit d8bb833

Please sign in to comment.