Move fast tanh enable call to static plugin init

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX
2023-06-15 16:36:31 +02:00
parent f2cecf5491
commit 3710dda839
2 changed files with 8 additions and 4 deletions
+8 -1
View File
@@ -90,5 +90,12 @@ static const LV2_Descriptor descriptor =
LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index)
{
return index == 0 ? &descriptor : nullptr;
if (index == 0) {
// Turn on fast tanh approximation
activations::Activation::enable_fast_tanh();
return &descriptor;
}
return nullptr;
}
-3
View File
@@ -11,9 +11,6 @@
namespace NAM {
Plugin::Plugin()
{
// Turn on fast tanh approximation
activations::Activation::enable_fast_tanh();
// prevent allocations on the audio thread
currentModelPath.reserve(MAX_FILE_NAME+1);
}