/[svn]/linuxsampler/trunk/src/engines/gig/EngineChannel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/EngineChannel.cpp

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

revision 674 by schoenebeck, Tue Jun 21 18:00:52 2005 UTC revision 675 by schoenebeck, Wed Jun 22 22:09:28 2005 UTC
# Line 49  namespace LinuxSampler { namespace gig { Line 49  namespace LinuxSampler { namespace gig {
49          InstrumentStat = -1;          InstrumentStat = -1;
50          AudioDeviceChannelLeft  = -1;          AudioDeviceChannelLeft  = -1;
51          AudioDeviceChannelRight = -1;          AudioDeviceChannelRight = -1;
52            pMidiInputPort = NULL;
53            midiChannel = midi_chan_all;
54          ResetControllers();          ResetControllers();
55      }      }
56    
# Line 340  namespace LinuxSampler { namespace gig { Line 342  namespace LinuxSampler { namespace gig {
342          }          }
343      }      }
344    
345        void EngineChannel::Connect(MidiInputPort* pMidiPort, midi_chan_t MidiChannel) {
346            if (!pMidiPort || pMidiPort == this->pMidiInputPort) return;
347            DisconnectMidiInputPort();
348            this->pMidiInputPort = pMidiPort;
349            this->midiChannel    = MidiChannel;
350            pMidiPort->Connect(this, MidiChannel);
351        }
352    
353        void EngineChannel::DisconnectMidiInputPort() {
354            MidiInputPort* pOldPort = this->pMidiInputPort;
355            this->pMidiInputPort = NULL;
356            if (pOldPort) pOldPort->Disconnect(this);
357        }
358    
359        MidiInputPort* EngineChannel::GetMidiInputPort() {
360            return pMidiInputPort;
361        }
362    
363        midi_chan_t EngineChannel::MidiChannel() {
364            return midiChannel;
365        }
366    
367      /**      /**
368       *  Will be called by the MIDIIn Thread to let the audio thread trigger a new       *  Will be called by the MIDIIn Thread to let the audio thread trigger a new
369       *  voice for the given key.       *  voice for the given key.

Legend:
Removed from v.674  
changed lines
  Added in v.675

  ViewVC Help
Powered by ViewVC