From 72259917e25e04a5966dabdbdb29b92359aeddaf Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 15 Feb 2015 11:06:03 +0000 Subject: [PATCH] Fix build --- plugins/MVerb/DistrhoPluginMVerb.cpp | 6 +++--- plugins/MVerb/DistrhoUIMVerb.cpp | 31 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/plugins/MVerb/DistrhoPluginMVerb.cpp b/plugins/MVerb/DistrhoPluginMVerb.cpp index 26c22aa..c6f47e9 100644 --- a/plugins/MVerb/DistrhoPluginMVerb.cpp +++ b/plugins/MVerb/DistrhoPluginMVerb.cpp @@ -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(index)) * 100.0f; } void DistrhoPluginMVerb::d_setParameterValue(uint32_t index, float value) { - fVerb.setParameter(index, value / 100.0f); + fVerb.setParameter(static_cast(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(frames)); } // ----------------------------------------------------------------------- diff --git a/plugins/MVerb/DistrhoUIMVerb.cpp b/plugins/MVerb/DistrhoUIMVerb.cpp index fca4df9..db28ed0 100644 --- a/plugins/MVerb/DistrhoUIMVerb.cpp +++ b/plugins/MVerb/DistrhoUIMVerb.cpp @@ -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::DAMPINGFREQ)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::DENSITY)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::BANDWIDTHFREQ)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::DECAY)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::PREDELAY)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::SIZE)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::GAIN)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::MIX)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::EARLYMIX)); + ImageKnob* const knob(new ImageKnob(this, knobImage, ImageKnob::Vertical)); + knob->setId(MVerb::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::NUM_PARAMS; ++i) + for (std::size_t i=0; i::NUM_PARAMS; ++i) { std::snprintf(strBuf, 32, "%i%%", int(fKnobs[i]->getValue())); fNanoText.textBox(58 + fKnobs[i]->getAbsoluteX()-56, 73, 30.0f, strBuf, nullptr);