From 29b18ab1efb7251f9d8d586ef39fedb9f973eba5 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 9 Jul 2024 13:56:16 -0400 Subject: [PATCH 1/2] Deal with user specified INSTRUMENT_TYPE We switch on INSTRUMENT_TYPE to set the internall wrapper handler. We actually only use this in one spot internally but we were failing to make a buildable wrapper if you set the type to something not in our list-of-three. So for now, warn and default out to internal instrument for the other types (which is probably the right behavior for aumf, which is what raised this issue in #271) --- src/detail/auv2/build-helper/build-helper.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/detail/auv2/build-helper/build-helper.cpp b/src/detail/auv2/build-helper/build-helper.cpp index a7267f33..8197dacb 100644 --- a/src/detail/auv2/build-helper/build-helper.cpp +++ b/src/detail/auv2/build-helper/build-helper.cpp @@ -331,14 +331,21 @@ int main(int argc, char **argv) { cppf << "AUV2_Type::aumu_musicdevice"; } - if (u.type == "aumi") + else if (u.type == "aumi") { cppf << "AUV2_Type::aumi_noteeffect"; } - if (u.type == "aufx") + else if (u.type == "aufx") { cppf << "AUV2_Type::aufx_effect"; } + else + { + std::cout << " + WARNING: Unable to determine AUV2_Type for instrument type '" << u.type + << "'" << std::endl; + std::cout << " Defaulting to AUV2_Type::musicdevice" << std::endl; + cppf << "AUV2_Type::aumu_musicdevice"; + } cppf << "," << args << ", ci) {}" << "};\n" << "AUSDK_COMPONENT_ENTRY(ausdk::AUMusicDeviceFactory, " << on << ");\n"; From bb8a91e10d2d3630c739feaa8aa76c3be76e617f Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 9 Jul 2024 13:59:21 -0400 Subject: [PATCH 2/2] Minor cosmetic cxhange --- src/detail/auv2/build-helper/build-helper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detail/auv2/build-helper/build-helper.cpp b/src/detail/auv2/build-helper/build-helper.cpp index 8197dacb..9b99e7db 100644 --- a/src/detail/auv2/build-helper/build-helper.cpp +++ b/src/detail/auv2/build-helper/build-helper.cpp @@ -341,9 +341,9 @@ int main(int argc, char **argv) } else { - std::cout << " + WARNING: Unable to determine AUV2_Type for instrument type '" << u.type - << "'" << std::endl; - std::cout << " Defaulting to AUV2_Type::musicdevice" << std::endl; + std::cout << " + WARNING: Unable to determine AUV2_Type for instrument type '" << u.type + << "'\n" + << " Defaulting to AUV2_Type::musicdevice" << std::endl; cppf << "AUV2_Type::aumu_musicdevice"; } cppf << "," << args << ", ci) {}"