Make sure MSVC knows which version of 'floor()' we want
authorJohn Emmas <johne53@tiscali.co.uk>
Sun, 22 May 2016 14:53:16 +0000 (15:53 +0100)
committerJohn Emmas <johne53@tiscali.co.uk>
Sun, 22 May 2016 14:53:16 +0000 (15:53 +0100)
libs/backends/dummy/dummy_audiobackend.cc

index 03e48cb605aeeae09e959dd3d83ae5cce35b7a69..3bbb16878afd0e415f7dbb29ff2ebf2ac812409e 100644 (file)
@@ -1724,7 +1724,7 @@ DummyAudioPort::setup_generator (GeneratorType const g, float const samplerate,
                        break;
                case SineWaveOctaves:
                        {
-                                const int x = c - floor (total / 2);
+                                const int x = c - floor (((float)total / 2));
                                 float f = powf (2.f, x / 3.f) * 1000.f;
                                 f = std::max (10.f, std::min (samplerate *.5f, f));
                                 const size_t mult = fit_wave (f, samplerate);