lib/fmt/AudioFormatFormatter: add formatter for SampleFormat

This commit is contained in:
Max Kellermann 2021-11-04 14:54:11 +01:00
parent 3e05cba30e
commit 5ff0bbd0f8

View File

@ -35,6 +35,16 @@
#include <fmt/format.h>
template<>
struct fmt::formatter<SampleFormat> : formatter<string_view>
{
template<typename FormatContext>
auto format(const SampleFormat format, FormatContext &ctx) {
return formatter<string_view>::format(sample_format_to_string(format),
ctx);
}
};
template<>
struct fmt::formatter<AudioFormat> : formatter<string_view>
{