On Dienstag, 28. Dezember 2021 11:21:28 CET Andrew C wrote:
> This is the output when I, shall we say, non-interactively (i.e netcat)
> send a command to Linuxsampler:
> 
> Data type is libgig and data version is 4.3.0.svn34
> Trying to find an available editor.
> Loading instrument editor plugins...Successfully loaded:
> /usr/local/lib/linuxsampler/plugins/libgigeditlinuxsamplerplugin.so
> OK
> InnerFactories.begin.
> Returning available editors result.
> Instrument plugin is
> Searching for matching editors now...
> Trying to find an editor that can support: libgig and 4.3.0.svn34
> Trying to find an available editor.
> Loading instrument editor plugins...Successfully loaded:
> /usr/local/lib/linuxsampler/plugins/libgigeditlinuxsamplerplugin.so
> OK
> InnerFactories.begin.
> Returning available editors result.
> Registered instrument editors again:
> Searched finished for matching editors...
> vEditors looks empty. What about available editors string?Trying to find an
> available editor.
> Loading instrument editor plugins...Successfully loaded:
> /usr/local/lib/linuxsampler/plugins/libgigeditlinuxsamplerplugin.so
> OK
> InnerFactories.begin.
> Returning available editors result.
> ERROR: There is not any instrument editor registered to the sampler!
> 
> 
> It looks like the iterating through the previously registered editors gets
> "forgotten" or otherwise the 'InnerFactories.begin()' loop is empty in the
> 'non-interactive' example..
> Phew.. That's enough wall of text then!

Are you requesting a sampler reset per LSCP comand via netcat somewhere in 
between? Because a sampler reset request will reset really everything, i.e. 
the sampler would also call

src/Sampler.cpp:
        void Sampler::Reset() {
                ...
                InstrumentEditorFactory::ClosePlugins();
                ...
        }

And ClosePlugin() closes all open plugin DLLs. Once the instrument editor DLL 
is unloaded from memory, the following destructor code is executed 
automatically:

src/plugins/InstrumentEditorFactory.h:
        ~InnerFactoryRegistrator() {
                InnerFactoryTemplate<PluginClass_T> innerFactory;
                        InstrumentEditor* pEditor = innerFactory.Create();
                        if (InnerFactories.count(pEditor->Name())) {
                                InnerFactory* pZombie =
                                        InnerFactories[pEditor->Name()];
                                InnerFactories.erase(pEditor->Name());
                                if (pZombie) delete pZombie;
                        }
                        innerFactory.Destroy(pEditor);
        }

CU
Christian




_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to