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