Browse Source

Fix build

tags/0.9
falkTX 11 years ago
parent
commit
72259917e2
2 changed files with 23 additions and 14 deletions
  1. +3
    -3
      plugins/MVerb/DistrhoPluginMVerb.cpp
  2. +20
    -11
      plugins/MVerb/DistrhoUIMVerb.cpp

+ 3
- 3
plugins/MVerb/DistrhoPluginMVerb.cpp View File

@@ -128,12 +128,12 @@ void DistrhoPluginMVerb::d_initProgramName(uint32_t index, d_string& programName
float DistrhoPluginMVerb::d_getParameterValue(uint32_t index) const
{
return fVerb.getParameter(index) * 100.0f;
return fVerb.getParameter(static_cast<int>(index)) * 100.0f;
}
void DistrhoPluginMVerb::d_setParameterValue(uint32_t index, float value)
{
fVerb.setParameter(index, value / 100.0f);
fVerb.setParameter(static_cast<int>(index), value / 100.0f);
}
void DistrhoPluginMVerb::d_setProgram(uint32_t index)
@@ -212,7 +212,7 @@ void DistrhoPluginMVerb::d_activate()
void DistrhoPluginMVerb::d_run(const float** inputs, float** outputs, uint32_t frames)
{
fVerb.process(inputs, outputs, frames);
fVerb.process(inputs, outputs, static_cast<int>(frames));
}
// -----------------------------------------------------------------------


+ 20
- 11
plugins/MVerb/DistrhoUIMVerb.cpp View File

@@ -37,13 +37,14 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fImgBackground = Image(DistrhoArtworkMVerb::backgroundData, DistrhoArtworkMVerb::backgroundWidth, DistrhoArtworkMVerb::backgroundHeight, GL_BGR);

// text
fNanoText.createFontMem("kh", (uchar*)khkangrey_ttf, khkangrey_ttfSize, false);
fNanoText.createFontMem("kh", (const uchar*)khkangrey_ttf, khkangrey_ttfSize, false);

// knobs
Image knobImage(DistrhoArtworkMVerb::knobData, DistrhoArtworkMVerb::knobWidth, DistrhoArtworkMVerb::knobHeight);

{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::DAMPINGFREQ));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::DAMPINGFREQ);
knob->setAbsolutePos(56 + 7*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -51,7 +52,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::DENSITY));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::DENSITY);
knob->setAbsolutePos(56 + 4*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -59,7 +61,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::BANDWIDTHFREQ));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::BANDWIDTHFREQ);
knob->setAbsolutePos(56 + 5*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -67,7 +70,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::DECAY));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::DECAY);
knob->setAbsolutePos(56 + 6*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -75,7 +79,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::PREDELAY));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::PREDELAY);
knob->setAbsolutePos(56 + 1*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -83,7 +88,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::SIZE));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::SIZE);
knob->setAbsolutePos(56 + 3*40, 40);
knob->setRange(5.0f, 100.0f);
knob->setDefault(100.0f);
@@ -91,7 +97,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::GAIN));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::GAIN);
knob->setAbsolutePos(56 + 8*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(75.0f);
@@ -99,7 +106,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::MIX));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::MIX);
knob->setAbsolutePos(56 + 0*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -107,7 +115,8 @@ DistrhoUIMVerb::DistrhoUIMVerb()
fKnobs.push_back(knob);
}
{
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical, MVerb<float>::EARLYMIX));
ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical));
knob->setId(MVerb<float>::EARLYMIX);
knob->setAbsolutePos(56 + 2*40, 40);
knob->setRange(0.0f, 100.0f);
knob->setDefault(50.0f);
@@ -233,7 +242,7 @@ void DistrhoUIMVerb::onDisplay()
char strBuf[32+1];
strBuf[32] = '\0';

for (int i=0; i<MVerb<float>::NUM_PARAMS; ++i)
for (std::size_t i=0; i<MVerb<float>::NUM_PARAMS; ++i)
{
std::snprintf(strBuf, 32, "%i%%", int(fKnobs[i]->getValue()));
fNanoText.textBox(58 + fKnobs[i]->getAbsoluteX()-56, 73, 30.0f, strBuf, nullptr);


Loading…
Cancel
Save