/[svn]/gigedit/trunk/src/plugin/linuxsamplerplugin.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/plugin/linuxsamplerplugin.cpp

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

revision 1659 by schoenebeck, Sat Feb 2 08:18:19 2008 UTC revision 1660 by schoenebeck, Sun Feb 3 00:19:55 2008 UTC
# Line 100  int LinuxSamplerPlugin::Main(void* pInst Line 100  int LinuxSamplerPlugin::Main(void* pInst
100          sigc::mem_fun(*this, &LinuxSamplerPlugin::NotifySampleReferenceChanged)          sigc::mem_fun(*this, &LinuxSamplerPlugin::NotifySampleReferenceChanged)
101      );      );
102    
103        app->signal_keyboard_key_hit().connect(
104            sigc::mem_fun(*this, &LinuxSamplerPlugin::__onVirtualKeyboardKeyHit)
105        );
106        app->signal_keyboard_key_released().connect(
107            sigc::mem_fun(*this, &LinuxSamplerPlugin::__onVirtualKeyboardKeyReleased)
108        );
109    
110      // register a timeout job to gigedit's main loop, so we can poll the      // register a timeout job to gigedit's main loop, so we can poll the
111      // the sampler periodically for MIDI events (I HOPE it works on all      // the sampler periodically for MIDI events (I HOPE it works on all
112      // archs, because gigedit is actually running in another thread than      // archs, because gigedit is actually running in another thread than
# Line 137  void LinuxSamplerPlugin::__onSamplesToBe Line 144  void LinuxSamplerPlugin::__onSamplesToBe
144      NotifySamplesToBeRemoved(samples);      NotifySamplesToBeRemoved(samples);
145  }  }
146    
147    void LinuxSamplerPlugin::__onVirtualKeyboardKeyHit(int Key, int Velocity) {
148        SendNoteOnToSampler(Key, Velocity);
149    }
150    
151    void LinuxSamplerPlugin::__onVirtualKeyboardKeyReleased(int Key, int Velocity) {
152        SendNoteOffToSampler(Key, Velocity);
153    }
154    
155  bool LinuxSamplerPlugin::IsTypeSupported(String sTypeName, String sTypeVersion) {  bool LinuxSamplerPlugin::IsTypeSupported(String sTypeName, String sTypeVersion) {
156      return sTypeName == gig::libraryName() &&      return sTypeName == gig::libraryName() &&
157             sTypeVersion == gig::libraryVersion();             sTypeVersion == gig::libraryVersion();

Legend:
Removed from v.1659  
changed lines
  Added in v.1660

  ViewVC Help
Powered by ViewVC