Merge branch 'v0.21.x'
This commit is contained in:
commit
ca4e53859d
@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush pending data and return it. This should be called
|
* Flush pending data and return it. This should be called
|
||||||
* repepatedly until it returns nullptr.
|
* repeatedly until it returns nullptr.
|
||||||
*/
|
*/
|
||||||
virtual ConstBuffer<void> Flush();
|
virtual ConstBuffer<void> Flush();
|
||||||
};
|
};
|
||||||
|
@ -55,6 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override;
|
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override;
|
||||||
|
ConstBuffer<void> Flush() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PreparedAutoConvertFilter final : public PreparedFilter {
|
class PreparedAutoConvertFilter final : public PreparedFilter {
|
||||||
@ -103,6 +104,18 @@ AutoConvertFilter::FilterPCM(ConstBuffer<void> src)
|
|||||||
return filter->FilterPCM(src);
|
return filter->FilterPCM(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConstBuffer<void>
|
||||||
|
AutoConvertFilter::Flush()
|
||||||
|
{
|
||||||
|
if (convert != nullptr) {
|
||||||
|
auto result = convert->Flush();
|
||||||
|
if (!result.IsNull())
|
||||||
|
return filter->FilterPCM(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
return filter->Flush();
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<PreparedFilter>
|
std::unique_ptr<PreparedFilter>
|
||||||
autoconvert_filter_new(std::unique_ptr<PreparedFilter> filter) noexcept
|
autoconvert_filter_new(std::unique_ptr<PreparedFilter> filter) noexcept
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user