pcm/*: use std::span instead of ConstBuffer

This commit is contained in:
Max Kellermann
2022-07-04 15:27:03 +02:00
parent d89136b09c
commit 4ce1dae673
58 changed files with 572 additions and 595 deletions

View File

@@ -55,7 +55,7 @@ public:
ConstBuffer<void> Flush() override {
return state
? state->Flush()
: nullptr;
: std::span<const std::byte>{};
}
};
@@ -108,7 +108,7 @@ ConvertFilter::FilterPCM(ConstBuffer<void> src)
return state
? state->Convert(src)
/* optimized special case: no-op */
: src;
: std::span<const std::byte>{src};
}
std::unique_ptr<PreparedFilter>

View File

@@ -201,7 +201,7 @@ ConstBuffer<void>
ReplayGainFilter::FilterPCM(ConstBuffer<void> src)
{
return mixer != nullptr
? src
? std::span<const std::byte>{src}
: pv.Apply(src);
}