Skip to content

Commit

Permalink
Deal with user specified INSTRUMENT_TYPE (#275)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
baconpaul authored Jul 9, 2024
1 parent 48861ec commit 962a4be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/detail/auv2/build-helper/build-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
<< "'\n"
<< " Defaulting to AUV2_Type::musicdevice" << std::endl;
cppf << "AUV2_Type::aumu_musicdevice";
}
cppf << "," << args << ", ci) {}"
<< "};\n"
<< "AUSDK_COMPONENT_ENTRY(ausdk::AUMusicDeviceFactory, " << on << ");\n";
Expand Down

0 comments on commit 962a4be

Please sign in to comment.