Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
recorrection, we only need ScopedSafeLocale for state handling
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 29, 2023
1 parent 7f45300 commit c24763e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
5 changes: 0 additions & 5 deletions distrho/src/DistrhoPluginCLAP.cpp
Expand Up @@ -1214,14 +1214,9 @@ class PluginCLAP : ClapEventQueue
}

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

return true;
}
Expand Down
15 changes: 2 additions & 13 deletions distrho/src/DistrhoPluginVST3.cpp
Expand Up @@ -1842,18 +1842,12 @@ class PluginVst3
*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
Expand Down Expand Up @@ -1898,14 +1892,9 @@ class PluginVst3

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;
Expand Down

0 comments on commit c24763e

Please sign in to comment.