/[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 288 by schoenebeck, Tue Oct 19 00:36:34 2004 UTC revision 289 by schoenebeck, Tue Oct 19 14:41:38 2004 UTC
# Line 22  Line 22 
22    
23  #include "MidiInputDeviceFactory.h"  #include "MidiInputDeviceFactory.h"
24    
25  // just to avoid linker problems  #if HAVE_ALSA
26  #include "MidiInputDeviceAlsa.h"  # include "MidiInputDeviceAlsa.h"
27    #endif // HAVE_ALSA
28    
29  namespace LinuxSampler {  namespace LinuxSampler {
30    
31      std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories;      std::map<String, MidiInputDeviceFactory::InnerFactory*> MidiInputDeviceFactory::InnerFactories;
32      std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories;      std::map<String, DeviceParameterFactory*> MidiInputDeviceFactory::ParameterFactories;
33    
34      // just a little hack to avoid linker problems  #if HAVE_ALSA
35      static int ___init___foo___() {      REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceAlsa);
36          #if HAVE_ALSA      /* Common parameters */
37          MidiInputDeviceAlsa::Name().c_str();      REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterActive);
38          #endif // HAVE_ALSA      REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterPorts);
39          return 0;  #endif // HAVE_ALSA
     }  
     static int ___foo___ = ___init___foo___();  
40    
41      MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {      MidiInputDevice* MidiInputDeviceFactory::Create(String DriverName, std::map<String,String> Parameters) throw (LinuxSamplerException) {
42          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 + "'.");

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

  ViewVC Help
Powered by ViewVC