/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputDeviceFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInputDeviceFactory.cpp

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

revision 287 by schoenebeck, Tue Jul 13 22:10:21 2004 UTC revision 288 by schoenebeck, Tue Oct 19 00:36:34 2004 UTC
# Line 22  Line 22 
22    
23  #include "MidiInputDeviceFactory.h"  #include "MidiInputDeviceFactory.h"
24    
25    // just to avoid linker problems
26    #include "MidiInputDeviceAlsa.h"
27    
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
30      std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories;      std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories;
31      std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories;      std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories;
32    
33        // just a little hack to avoid linker problems
34        static int ___init___foo___() {
35            #if HAVE_ALSA
36            MidiInputDeviceAlsa::Name().c_str();
37            #endif // HAVE_ALSA
38            return 0;
39        }
40        static int ___foo___ = ___init___foo___();
41    
42      MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {      MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {
43          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no midi input driver '" + DriverName + "'.");          if (!InnerFactories.count(DriverName)) throw LinuxSamplerException("There is no midi input driver '" + DriverName + "'.");
44          //Let's see if we need to create parameters          //Let's see if we need to create parameters

Legend:
Removed from v.287  
changed lines
  Added in v.288

  ViewVC Help
Powered by ViewVC