Skip to content

Commit

Permalink
Eject the CLAP features as AUv2 tags
Browse files Browse the repository at this point in the history
Addresses #324
  • Loading branch information
baconpaul committed Oct 30, 2024
1 parent 0c23f5e commit f49ee38
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/detail/auv2/build-helper/build-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct auInfo
{
std::string name, vers, type, subt, manu, manunm, clapid, desc, clapname, bundlevers;
bool explicitMode{false};
std::vector<std::string> tags;

const std::string factoryBase{"wrapAsAUV2_inst"};

Expand Down Expand Up @@ -78,8 +79,19 @@ struct auInfo
<< " <true/>\n"
<< " <key>temporary-exception.files.all.read-write</key>\n"
<< " <true/>\n"
<< " </dict>\n"
<< " </dict>\n";
<< " </dict>\n";

if (!tags.empty())
{
of << " <key>tags</key>\n"
<< " <array>\n";
for (const auto &tag : tags)
{
of << " <string>" << tag << "</string>\n";
}
of << " </array>\n";
}
of << " </dict>\n";
}
};

Expand Down Expand Up @@ -154,6 +166,13 @@ bool buildUnitsFromClap(const std::string &clapfile, const std::string &clapname
u.type = "aumu";
}

auto fp = clapPlug->features;
while (*fp)
{
u.tags.push_back(*fp);
++fp;
}

if (loader._pluginFactoryAUv2Info)
{
clap_plugin_info_as_auv2_t v2inf;
Expand Down

0 comments on commit f49ee38

Please sign in to comment.