Skip to content

Commit

Permalink
Set up the VST3 Root Until so vst3 validator succeeds (#128)
Browse files Browse the repository at this point in the history
Set up all the IDs required to get a valid root unit in the
steinberg validator. Addresses #118
  • Loading branch information
baconpaul authored Sep 11, 2023
1 parent cefb565 commit 87ee3da
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/wrapasvst3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ Vst::UnitID ClapAsVst3::getOrCreateUnitInfo(const char* modulename)
}
else
{
// the unit needs to be created
Steinberg::Vst::String128 name;
std::string u8name(path[i]);
if (VST3::StringConvert::convert(u8name, name))
Expand Down Expand Up @@ -581,10 +580,14 @@ void ClapAsVst3::setupParameters(const clap_plugin_t* plugin, const clap_plugin_
units.clear();

{
Vst::String128 rootname(STR16("root"));
Vst::Unit* newunit = new Vst::Unit(rootname, Vst::kNoParentUnitId,
Vst::kRootUnitId); // a new unit without a program list
addUnit(newunit);
Vst::UnitInfo rootInfo;
rootInfo.id = Vst::kRootUnitId;
rootInfo.parentUnitId = Vst::kNoParentUnitId;
rootInfo.programListId = Vst::kNoProgramListId;
VST3::StringConvert::convert(std::string("Root"), rootInfo.name);

auto rootUnit = new Vst::Unit(rootInfo);
addUnit(rootUnit);
}

auto numparams = params->count(plugin);
Expand Down

0 comments on commit 87ee3da

Please sign in to comment.