Print ignored opcodes

This commit is contained in:
Robbert van der Helm
2020-03-10 22:12:46 +01:00
parent 6fc2f70279
commit 2bd33f1322
3 changed files with 7 additions and 2 deletions
-2
View File
@@ -43,8 +43,6 @@ constexpr char logging_file_environment_variable[] = "YABRIDGE_DEBUG_FILE";
constexpr char logging_verbosity_environment_variable[] =
"YABRIDGE_DEBUG_LEVEL";
std::optional<std::string> opcode_to_string(bool is_dispatch, int opcode);
Logger::Logger(std::shared_ptr<std::ostream> stream,
Verbosity verbosity_level,
std::string prefix)
+2
View File
@@ -117,3 +117,5 @@ class Logger {
*/
std::string prefix;
};
std::optional<std::string> opcode_to_string(bool is_dispatch, int opcode);
+5
View File
@@ -203,6 +203,11 @@ class HostCallbackDataConverter : DefaultDataConverter {
// be needed? `audioMasterWantMidi` is deprecated though.
case audioMasterWantMidi:
case audioMasterUpdateDisplay:
std::cerr << "Got opcode "
<< opcode_to_string(false, opcode)
.value_or(std::to_string(opcode))
<< "), ignoring..." << std::endl;
return std::nullopt;
break;
default: