Browse Source

MSVC warnings

tags/2021-05-28
ed 8 years ago
parent
commit
8c55f73f45
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      examples/BLOCKS/BlocksSynth/Source/MainComponent.h
  2. +1
    -1
      examples/BLOCKS/BlocksSynth/Source/Oscillators.h
  3. +2
    -2
      examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h

+ 2
- 2
examples/BLOCKS/BlocksSynth/Source/MainComponent.h View File

@@ -152,7 +152,7 @@ private:
if (waveshapeMode > 3)
waveshapeMode = 0;
waveshapeProgram->setWaveshapeType (waveshapeMode);
waveshapeProgram->setWaveshapeType (static_cast<uint8> (waveshapeMode));
}
else if (currentMode == playMode)
{
@@ -246,7 +246,7 @@ private:
grid->setProgram (waveshapeProgram);
// Initialise the program
waveshapeProgram->setWaveshapeType (waveshapeMode);
waveshapeProgram->setWaveshapeType (static_cast<uint8> (waveshapeMode));
waveshapeProgram->generateWaveshapes();
}
else if (currentMode == playMode)


+ 1
- 1
examples/BLOCKS/BlocksSynth/Source/Oscillators.h View File

@@ -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<double> amplitude, phaseIncrement;


+ 2
- 2
examples/BLOCKS/BlocksSynth/Source/WaveshapeProgram.h View File

@@ -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<uint8> (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<uint8> (x) : static_cast<uint8> (14 - (x % 15));
// Add half cycle to end of array so it loops correctly
if (x < 15)


Loading…
Cancel
Save