/[svn]/linuxsampler/trunk/src/Sampler.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/Sampler.cpp

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

revision 1686 by schoenebeck, Thu Feb 14 14:58:50 2008 UTC revision 1723 by schoenebeck, Sun Apr 20 08:53:39 2008 UTC
# Line 32  Line 32 
32  #include "drivers/audio/AudioOutputDeviceFactory.h"  #include "drivers/audio/AudioOutputDeviceFactory.h"
33  #include "drivers/midi/MidiInputDeviceFactory.h"  #include "drivers/midi/MidiInputDeviceFactory.h"
34  #include "drivers/midi/MidiInstrumentMapper.h"  #include "drivers/midi/MidiInstrumentMapper.h"
35    #include "common/Features.h"
36    
37  namespace LinuxSampler {  namespace LinuxSampler {
38    
# Line 318  namespace LinuxSampler { Line 319  namespace LinuxSampler {
319          }          }
320      }      }
321    
322        void Sampler::fireMidiDeviceToBeDestroyed(MidiInputDevice* pDevice) {
323            for (int i = 0; i < llMidiDeviceCountListeners.GetListenerCount(); i++) {
324                llMidiDeviceCountListeners.GetListener(i)->MidiDeviceToBeDestroyed(pDevice);
325            }
326        }
327    
328        void Sampler::fireMidiDeviceCreated(MidiInputDevice* pDevice) {
329            for (int i = 0; i < llMidiDeviceCountListeners.GetListenerCount(); i++) {
330                llMidiDeviceCountListeners.GetListener(i)->MidiDeviceCreated(pDevice);
331            }
332        }
333    
334      void Sampler::AddVoiceCountListener(VoiceCountListener* l) {      void Sampler::AddVoiceCountListener(VoiceCountListener* l) {
335          llVoiceCountListeners.AddListener(l);          llVoiceCountListeners.AddListener(l);
336      }      }
# Line 559  namespace LinuxSampler { Line 572  namespace LinuxSampler {
572                  for (uint i = 0; i < SamplerChannels(); i++)                  for (uint i = 0; i < SamplerChannels(); i++)
573                      if (GetSamplerChannel(i)->GetMidiInputDevice() == pDevice) throw Exception("Sampler channel " + ToString(i) + " is still connected to the midi input device.");                      if (GetSamplerChannel(i)->GetMidiInputDevice() == pDevice) throw Exception("Sampler channel " + ToString(i) + " is still connected to the midi input device.");
574    
575                    fireMidiDeviceToBeDestroyed(pDevice);
576    
577                  // disable device                  // disable device
578                  pDevice->StopListen();                  pDevice->StopListen();
579    
# Line 586  namespace LinuxSampler { Line 601  namespace LinuxSampler {
601                  }                  }
602          }          }
603    
604            fireMidiDeviceCreated(pDevice);
605          fireMidiDeviceCountChanged(MidiInputDevices());          fireMidiDeviceCountChanged(MidiInputDevices());
606          return pDevice;          return pDevice;
607      }      }
# Line 665  namespace LinuxSampler { Line 681  namespace LinuxSampler {
681          InstrumentEditorFactory::ClosePlugins();          InstrumentEditorFactory::ClosePlugins();
682      }      }
683    
684        bool Sampler::EnableDenormalsAreZeroMode() {
685            Features::detect();
686            return Features::enableDenormalsAreZeroMode();
687        }
688    
689  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.1686  
changed lines
  Added in v.1723

  ViewVC Help
Powered by ViewVC