From dd89d21a6635f7ead353e766f093672fa7247a06 Mon Sep 17 00:00:00 2001 From: Ross maxx Date: Mon, 3 Jul 2023 17:41:50 +0530 Subject: [PATCH] added caps init condition --- plugins/LadspaEffect/caps/interface.cc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/plugins/LadspaEffect/caps/interface.cc b/plugins/LadspaEffect/caps/interface.cc index 4f4edfbeee8..58a3b31e926 100644 --- a/plugins/LadspaEffect/caps/interface.cc +++ b/plugins/LadspaEffect/caps/interface.cc @@ -29,8 +29,6 @@ (2541 - 2580 donated to artemio@kdemail.net) */ -// #include - #include "basics.h" #include "Cabinet.h" @@ -58,15 +56,6 @@ #define N 39 static DescriptorStub * descriptors [N]; -/*static inline void -seed() -{ - static struct timeval tv; - gettimeofday (&tv, 0); - - srand (tv.tv_sec ^ tv.tv_usec); -}*/ - extern "C" { void caps_so_init() @@ -140,4 +129,10 @@ ladspa_descriptor (unsigned long i) return 0; } +struct CapsSoInit { + CapsSoInit() { caps_so_init(); } + ~CapsSoInit() { caps_so_fini(); } +}; +static CapsSoInit capsSoInit; + }; /* extern "C" */