From 1caff11c6b9c4866f1cc4b89554289c9f7076002 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 20 Nov 2014 11:10:45 +0200 Subject: [PATCH] Tidied up a few VS warnings. --- examples/Demo/Source/Demos/AnimationDemo.cpp | 2 +- examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Demo/Source/Demos/AnimationDemo.cpp b/examples/Demo/Source/Demos/AnimationDemo.cpp index 48b8bea833..5d5d60dc81 100644 --- a/examples/Demo/Source/Demos/AnimationDemo.cpp +++ b/examples/Demo/Source/Demos/AnimationDemo.cpp @@ -266,7 +266,7 @@ private: animator.animateComponent (componentsToAnimate.getUnchecked(i), r.reduced (10), 1.0f, - 900 + 300 * std::sin (angle), + 900 + (int) (300 * std::sin (angle)), false, 0.0, 0.0); diff --git a/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp b/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp index b602f577ef..6d1a37fba6 100644 --- a/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp +++ b/examples/Demo/Source/Demos/AudioSynthesiserDemo.cpp @@ -101,7 +101,7 @@ struct SineWaveVoice : public SynthesiserVoice { while (--numSamples >= 0) { - const float currentSample = std::sin (currentAngle) * level * tailOff; + const float currentSample = (float) (std::sin (currentAngle) * level * tailOff); for (int i = outputBuffer.getNumChannels(); --i >= 0;) outputBuffer.addSample (i, startSample, currentSample); @@ -124,7 +124,7 @@ struct SineWaveVoice : public SynthesiserVoice { while (--numSamples >= 0) { - const float currentSample = std::sin (currentAngle) * level; + const float currentSample = (float) (std::sin (currentAngle) * level); for (int i = outputBuffer.getNumChannels(); --i >= 0;) outputBuffer.addSample (i, startSample, currentSample);