Useful for debugging.
@@ -7,6 +7,7 @@
#pragma once
+#include <AK/Format.h>
#include <AK/Math.h>
namespace Audio {
@@ -146,3 +147,15 @@ struct Sample {
};
}
+
+namespace AK {
+template<>
+struct Formatter<Audio::Sample> : Formatter<FormatString> {
+ ErrorOr<void> format(FormatBuilder& builder, Audio::Sample const& value)
+ {
+ return Formatter<FormatString>::format(builder, "[{}, {}]", value.left, value.right);
+ }
+};
+}