本文整理汇总了C++中IParam::GetParamGroupForHost方法的典型用法代码示例。如果您正苦于以下问题:C++ IParam::GetParamGroupForHost方法的具体用法?C++ IParam::GetParamGroupForHost怎么用?C++ IParam::GetParamGroupForHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IParam
的用法示例。
在下文中一共展示了IParam::GetParamGroupForHost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetHost
tresult PLUGIN_API IPlugVST3Plugin::initialize (FUnknown* context)
{
TRACE;
tresult result = SingleComponentEffect::initialize(context);
String128 tmpStringBuf;
char hostNameCString[128];
FUnknownPtr<IHostApplication>app(context);
if (app)
{
app->getName(tmpStringBuf);
Steinberg::UString(tmpStringBuf, 128).toAscii(hostNameCString, 128);
SetHost(hostNameCString, 0); // Can't get version in VST3
}
if (result == kResultOk)
{
int maxInputs = getSpeakerArrForChans(NInChannels()-mScChans);
if(maxInputs < 0) maxInputs = 0;
// add io buses with the maximum i/o to start with
if (maxInputs)
{
Steinberg::UString(tmpStringBuf, 128).fromAscii(GetInputBusLabel(0)->Get(), 128);
addAudioInput(tmpStringBuf, maxInputs);
}
if(!mIsInst) // if effect, just add one output bus with max chan count
{
Steinberg::UString(tmpStringBuf, 128).fromAscii(GetOutputBusLabel(0)->Get(), 128);
addAudioOutput(tmpStringBuf, getSpeakerArrForChans(NOutChannels()) );
}
else
{
for (int i = 0, busIdx = 0; i < NOutChannels(); i+=2, busIdx++)
{
Steinberg::UString(tmpStringBuf, 128).fromAscii(GetOutputBusLabel(busIdx)->Get(), 128);
addAudioOutput(tmpStringBuf, SpeakerArr::kStereo );
}
}
if (mScChans)
{
if (mScChans > 2) mScChans = 2;
Steinberg::UString(tmpStringBuf, 128).fromAscii(GetInputBusLabel(1)->Get(), 128);
addAudioInput(tmpStringBuf, getSpeakerArrForChans(mScChans), kAux, 0);
}
if(DoesMIDI())
{
addEventInput (STR16("MIDI Input"), 1);
//addEventOutput(STR16("MIDI Output"), 1);
}
if (NPresets())
{
parameters.addParameter(new Parameter(STR16("Preset"),
kPresetParam,
STR16(""),
0,
NPresets(),
ParameterInfo::kIsProgramChange));
}
if(!mIsInst)
{
StringListParameter * bypass = new StringListParameter(STR16("Bypass"),
kBypassParam,
0,
ParameterInfo::kCanAutomate | ParameterInfo::kIsBypass | ParameterInfo::kIsList);
bypass->appendString(STR16("off"));
bypass->appendString(STR16("on"));
parameters.addParameter(bypass);
}
for (int i=0; i<NParams(); i++)
{
IParam *p = GetParam(i);
int32 flags = 0;
UnitID unitID = kRootUnitId;
const char* paramGroupName = p->GetParamGroupForHost();
if (CSTR_NOT_EMPTY(paramGroupName))
{
for(int j = 0; j < mParamGroups.GetSize(); j++)
{
if(strcmp(paramGroupName, mParamGroups.Get(j)) == 0)
{
unitID = j+1;
}
}
if (unitID == kRootUnitId) // new unit, nothing found, so add it
{
mParamGroups.Add(paramGroupName);
//.........这里部分代码省略.........