mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-07 04:00:09 +02:00
Move fast tanh enable call to static plugin init
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
+8
-1
@@ -90,5 +90,12 @@ static const LV2_Descriptor descriptor =
|
|||||||
|
|
||||||
LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index)
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
namespace NAM {
|
namespace NAM {
|
||||||
Plugin::Plugin()
|
Plugin::Plugin()
|
||||||
{
|
{
|
||||||
// Turn on fast tanh approximation
|
|
||||||
activations::Activation::enable_fast_tanh();
|
|
||||||
|
|
||||||
// prevent allocations on the audio thread
|
// prevent allocations on the audio thread
|
||||||
currentModelPath.reserve(MAX_FILE_NAME+1);
|
currentModelPath.reserve(MAX_FILE_NAME+1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user