diff --git a/src/sfizz/Opcode.cpp b/src/sfizz/Opcode.cpp index f7261941..52b3ec66 100644 --- a/src/sfizz/Opcode.cpp +++ b/src/sfizz/Opcode.cpp @@ -9,6 +9,7 @@ #include "absl/strings/ascii.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" +#include #include #include @@ -154,3 +155,8 @@ absl::optional sfz::readNoteValue(absl::string_view value) return static_cast(noteNumber); } + +std::ostream &operator<<(std::ostream &os, const sfz::Opcode &opcode) +{ + return os << opcode.opcode << '=' << '"' << opcode.value << '"'; +} diff --git a/src/sfizz/Opcode.h b/src/sfizz/Opcode.h index cd31c8c6..87b25666 100644 --- a/src/sfizz/Opcode.h +++ b/src/sfizz/Opcode.h @@ -16,6 +16,7 @@ #include #include #include +#include // charconv support is still sketchy with clang/gcc so we use abseil's numbers #include "absl/strings/numbers.h" @@ -292,3 +293,5 @@ inline void setCCPairFromOpcode(const Opcode& opcode, absl::optional