diff --git a/examples/BLOCKS/BlocksSynth/Source/MainComponent.h b/examples/BLOCKS/BlocksSynth/Source/MainComponent.h index 68cd2ec22e..fe9cfb29a2 100644 --- a/examples/BLOCKS/BlocksSynth/Source/MainComponent.h +++ b/examples/BLOCKS/BlocksSynth/Source/MainComponent.h @@ -152,7 +152,7 @@ private: if (waveshapeMode > 3) waveshapeMode = 0; - waveshapeProgram->setWaveshapeType (waveshapeMode); + waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); } else if (currentMode == playMode) { @@ -246,7 +246,7 @@ private: grid->setProgram (waveshapeProgram); // Initialise the program - waveshapeProgram->setWaveshapeType (waveshapeMode); + waveshapeProgram->setWaveshapeType (static_cast (waveshapeMode)); waveshapeProgram->generateWaveshapes(); } else if (currentMode == playMode) diff --git a/examples/BLOCKS/BlocksSynth/Source/Oscillators.h b/examples/BLOCKS/BlocksSynth/Source/Oscillators.h index 5e8c4694dd..f068ac86a4 100644 --- a/examples/BLOCKS/BlocksSynth/Source/Oscillators.h +++ b/examples/BLOCKS/BlocksSynth/Source/Oscillators.h @@ -81,7 +81,7 @@ public: virtual bool canPlaySound (SynthesiserSound*) override = 0; /** Subclasses should override this to render a waveshape */ - virtual double renderWaveShape (double currentPhase) = 0; + virtual double renderWaveShape (const double currentPhase) = 0; private: LinearSmoothedValue amplitude, phaseIncrement; diff --git a/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h b/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h index 3f0b98e4c8..4bd37e0f7b 100644 --- a/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h +++ b/examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h @@ -39,7 +39,7 @@ public: { // Scale and offset the sin output to the Lightpad display double sineOutput = sin (currentPhase); - sineWaveY[x] = roundToInt ((sineOutput * 6.5) + 7.0); + sineWaveY[x] = static_cast (roundToInt ((sineOutput * 6.5) + 7.0)); // Square wave output, set flags for when vertical line should be drawn if (currentPhase < double_Pi) @@ -64,7 +64,7 @@ public: sawWaveY[x] = 255; // Triangle wave output - triangleWaveY[x] = x < 15 ? x : 14 - (x % 15); + triangleWaveY[x] = x < 15 ? static_cast (x) : static_cast (14 - (x % 15)); // Add half cycle to end of array so it loops correctly if (x < 15)