/[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 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC revision 412 by schoenebeck, Sat Feb 26 22:44:51 2005 UTC
# Line 49  namespace LinuxSampler { Line 49  namespace LinuxSampler {
49          if (pEngineChannel) {          if (pEngineChannel) {
50              MidiInputPort* pMidiInputPort = GetMidiInputDevicePort(this->midiPort);              MidiInputPort* pMidiInputPort = GetMidiInputDevicePort(this->midiPort);
51              if (pMidiInputPort) pMidiInputPort->Disconnect(pEngineChannel);              if (pMidiInputPort) pMidiInputPort->Disconnect(pEngineChannel);
52              if (pAudioOutputDevice) pAudioOutputDevice->Disconnect(pEngineChannel);              if (pAudioOutputDevice) pEngineChannel->DisconnectAudioOutputDevice();
53              delete pEngineChannel;              delete pEngineChannel;
54          }          }
55      }      }
# Line 66  namespace LinuxSampler { Line 66  namespace LinuxSampler {
66          // disconnect old engine          // disconnect old engine
67          if (pEngineChannel) {          if (pEngineChannel) {
68              if (pMidiInputPort) pMidiInputPort->Disconnect(pEngineChannel);              if (pMidiInputPort) pMidiInputPort->Disconnect(pEngineChannel);
69              if (pAudioOutputDevice) pAudioOutputDevice->Disconnect(pEngineChannel);              if (pAudioOutputDevice) pEngineChannel->DisconnectAudioOutputDevice();
70              delete pEngineChannel;              delete pEngineChannel;
71          }          }
72    
73          // connect new engine channel          // connect new engine channel
74          pEngineChannel = pNewEngineChannel;          pEngineChannel = pNewEngineChannel;
75          if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, this->midiChannel);          if (pMidiInputPort) pMidiInputPort->Connect(pNewEngineChannel, this->midiChannel);
76          if (pAudioOutputDevice) pAudioOutputDevice->Connect(pNewEngineChannel);          if (pAudioOutputDevice) {
77                pNewEngineChannel->Connect(pAudioOutputDevice);
78                pAudioOutputDevice->Connect(pNewEngineChannel->GetEngine());
79            }
80          dmsg(2,("OK\n"));          dmsg(2,("OK\n"));
81      }      }
82    
83      void SamplerChannel::SetAudioOutputDevice(AudioOutputDevice* pDevice) {      void SamplerChannel::SetAudioOutputDevice(AudioOutputDevice* pDevice) {
84          // disconnect old device          // disconnect old device
85          if (pAudioOutputDevice && pEngineChannel) pAudioOutputDevice->Disconnect(pEngineChannel);          if (pAudioOutputDevice && pEngineChannel) pEngineChannel->DisconnectAudioOutputDevice();
86          // connect new device          // connect new device
87          pAudioOutputDevice = pDevice;          pAudioOutputDevice = pDevice;
88          if (pEngineChannel) pAudioOutputDevice->Connect(pEngineChannel);          if (pEngineChannel) {
89                pEngineChannel->Connect(pAudioOutputDevice);
90                pAudioOutputDevice->Connect(pEngineChannel->GetEngine());
91            }
92      }      }
93    
94      void SamplerChannel::SetMidiInputDevice(MidiInputDevice* pDevice) {      void SamplerChannel::SetMidiInputDevice(MidiInputDevice* pDevice) {

Legend:
Removed from v.411  
changed lines
  Added in v.412

  ViewVC Help
Powered by ViewVC