/[svn]/linuxsampler/trunk/src/plugins/InstrumentEditorFactory.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/plugins/InstrumentEditorFactory.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4020 by schoenebeck, Thu Dec 23 15:26:02 2021 UTC revision 4021 by schoenebeck, Wed Jan 5 16:11:04 2022 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2007 - 2021 Christian Schoenebeck                       *   *   Copyright (C) 2007 - 2022 Christian Schoenebeck                       *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 34  Line 34 
34      createInstrumentEditorInnerFactory() { \      createInstrumentEditorInnerFactory() { \
35          return new LinuxSampler::InstrumentEditorFactory::InnerFactoryTemplate<PluginClass>(); \          return new LinuxSampler::InstrumentEditorFactory::InnerFactoryTemplate<PluginClass>(); \
36      }      }
37        //FIXME: missing a destruction function for Windows
38    
39        //NOTE: using Windows' DllMain() API callback function is probably not a
40        // viable alternative, as that callback is too limited of what is allowed
41        // to do (e.g. Windows prohibits any thread synchronization mechanisms)
42  #else  #else
43  # define REGISTER_INSTRUMENT_EDITOR(PluginClass) \  # define REGISTER_INSTRUMENT_EDITOR(PluginClass) \
44      LinuxSampler::InstrumentEditorFactory::InnerFactoryRegistrator<PluginClass> \      LinuxSampler::InstrumentEditorFactory::InnerFactoryRegistrator<PluginClass> \
# Line 80  namespace LinuxSampler { Line 85  namespace LinuxSampler {
85              }              }
86    
87             ~InnerFactoryRegistrator() {             ~InnerFactoryRegistrator() {
88                    //FIXME: potential race with ClosePlugins()
89                    // (see comments in the latter for details)
90                  InnerFactoryTemplate<PluginClass_T> innerFactory;                  InnerFactoryTemplate<PluginClass_T> innerFactory;
91                  InstrumentEditor* pEditor = innerFactory.Create();                  InstrumentEditor* pEditor = innerFactory.Create();
92                  if (InnerFactories.count(pEditor->Name())) {                  if (InnerFactories.count(pEditor->Name())) {

Legend:
Removed from v.4020  
changed lines
  Added in v.4021

  ViewVC Help
Powered by ViewVC