Commit 5ff0bbd0 authored by Max Kellermann's avatar Max Kellermann

lib/fmt/AudioFormatFormatter: add formatter for SampleFormat

parent 3e05cba3
...@@ -36,6 +36,16 @@ ...@@ -36,6 +36,16 @@
#include <fmt/format.h> #include <fmt/format.h>
template<> 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> struct fmt::formatter<AudioFormat> : formatter<string_view>
{ {
template<typename FormatContext> template<typename FormatContext>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment