Browse Source

recorrection, we only need ScopedSafeLocale for state handling

Signed-off-by: falkTX <falktx@falktx.com>
pull/443/head
falkTX 2 years ago
parent
commit
c24763e9b3
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 2 additions and 18 deletions
  1. +0
    -5
      distrho/src/DistrhoPluginCLAP.cpp
  2. +2
    -13
      distrho/src/DistrhoPluginVST3.cpp

+ 0
- 5
distrho/src/DistrhoPluginCLAP.cpp View File

@@ -1214,14 +1214,9 @@ public:
}

if (isInteger)
{
*value = std::atoi(display);
}
else
{
const ScopedSafeLocale ssl;
*value = std::atof(display);
}

return true;
}


+ 2
- 13
distrho/src/DistrhoPluginVST3.cpp View File

@@ -1842,18 +1842,12 @@ public:
*output = static_cast<double>(std::atoi(ScopedUTF8String(input))) / DPF_VST3_MAX_BUFFER_SIZE;
return V3_OK;
case kVst3InternalParameterSampleRate:
{
const ScopedSafeLocale ssl;
*output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_SAMPLE_RATE;
}
*output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_SAMPLE_RATE;
return V3_OK;
#endif
#if DISTRHO_PLUGIN_WANT_LATENCY
case kVst3InternalParameterLatency:
{
const ScopedSafeLocale ssl;
*output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_LATENCY;
}
*output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_LATENCY;
return V3_OK;
#endif
#if DISTRHO_PLUGIN_WANT_PROGRAMS
@@ -1898,14 +1892,9 @@ public:

float value;
if (fPlugin.getParameterHints(index) & kParameterIsInteger)
{
value = std::atoi(input8);
}
else
{
const ScopedSafeLocale ssl;
value = std::atof(input8);
}

*output = ranges.getNormalizedValue(value);
return V3_OK;


Loading…
Cancel
Save