From 14d76e6282b4426f3d101ace025ff4ade81d3f03 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 6 Mar 2020 17:51:06 +0100 Subject: [PATCH] Use Steinberg's fixed size types, to fix MSVC build --- vst/SfizzVstController.cpp | 6 +++--- vst/SfizzVstState.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vst/SfizzVstController.cpp b/vst/SfizzVstController.cpp index e9869e50..77b71279 100644 --- a/vst/SfizzVstController.cpp +++ b/vst/SfizzVstController.cpp @@ -100,12 +100,12 @@ tresult PLUGIN_API SfizzVstControllerNoUi::getParamValueByString(Vst::ParamID ta switch (tag) { case kPidOversampling: { - int factor; + int32 factor; if (!Steinberg::String::scanInt32(string, factor, false) || factor < 1) factor = 1; - int log2Factor = 0; - for (int f = factor; f > 1; f /= 2) + int32 log2Factor = 0; + for (int32 f = factor; f > 1; f /= 2) ++log2Factor; valueNormalized = kParamOversamplingRange.normalize(log2Factor); diff --git a/vst/SfizzVstState.h b/vst/SfizzVstState.h index 3a2c712b..5f3a0fb0 100644 --- a/vst/SfizzVstState.h +++ b/vst/SfizzVstState.h @@ -33,9 +33,9 @@ class SfizzVstState { public: std::string sfzFile; float volume = 0; - int numVoices = 64; - int oversamplingLog2 = 0; - int preloadSize = 8192; + int32 numVoices = 64; + int32 oversamplingLog2 = 0; + int32 preloadSize = 8192; static constexpr uint64 currentStateVersion = 0; @@ -45,7 +45,7 @@ public: class SfizzUiState { public: - unsigned activePanel = 0; + uint32 activePanel = 0; static constexpr uint64 currentStateVersion = 0;