/[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 781 by schoenebeck, Mon Sep 26 10:17:00 2005 UTC revision 880 by schoenebeck, Tue Jun 27 22:57:37 2006 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 Christian Schoenebeck                              *   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 48  namespace LinuxSampler { namespace gig { Line 48  namespace LinuxSampler { namespace gig {
48          pMidiInputPort = NULL;          pMidiInputPort = NULL;
49          midiChannel = midi_chan_all;          midiChannel = midi_chan_all;
50          ResetControllers();          ResetControllers();
51            SoloMode       = false;
52            PortamentoMode = false;
53            PortamentoTime = CONFIG_PORTAMENTO_TIME_DEFAULT;
54      }      }
55    
56      EngineChannel::~EngineChannel() {      EngineChannel::~EngineChannel() {
# Line 108  namespace LinuxSampler { namespace gig { Line 111  namespace LinuxSampler { namespace gig {
111              pMIDIKeyInfo[i].itSelf         = Pool<uint>::Iterator();              pMIDIKeyInfo[i].itSelf         = Pool<uint>::Iterator();
112              pMIDIKeyInfo[i].VoiceTheftsQueued = 0;              pMIDIKeyInfo[i].VoiceTheftsQueued = 0;
113          }          }
114            SoloKey       = -1;    // no solo key active yet
115            PortamentoPos = -1.0f; // no portamento active yet
116    
117          // reset all key groups          // reset all key groups
118          std::map<uint,uint*>::iterator iter = ActiveKeyGroups.begin();          std::map<uint,uint*>::iterator iter = ActiveKeyGroups.begin();
# Line 184  namespace LinuxSampler { namespace gig { Line 189  namespace LinuxSampler { namespace gig {
189          catch (RIFF::Exception e) {          catch (RIFF::Exception e) {
190              InstrumentStat = -2;              InstrumentStat = -2;
191              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;
192              throw LinuxSamplerException(msg);              throw Exception(msg);
193          }          }
194          catch (InstrumentResourceManagerException e) {          catch (InstrumentResourceManagerException e) {
195              InstrumentStat = -3;              InstrumentStat = -3;
196              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();
197              throw LinuxSamplerException(msg);              throw Exception(msg);
198          }          }
199          catch (...) {          catch (...) {
200              InstrumentStat = -4;              InstrumentStat = -4;
201              throw LinuxSamplerException("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");              throw Exception("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");
202          }          }
203    
204          // rebuild ActiveKeyGroups map with key groups of current instrument          // rebuild ActiveKeyGroups map with key groups of current instrument
# Line 210  namespace LinuxSampler { namespace gig { Line 215  namespace LinuxSampler { namespace gig {
215          }          }
216          catch (AudioOutputException e) {          catch (AudioOutputException e) {
217              String msg = "Audio output device unable to provide 2 audio channels, cause: " + e.Message();              String msg = "Audio output device unable to provide 2 audio channels, cause: " + e.Message();
218              throw LinuxSamplerException(msg);              throw Exception(msg);
219          }          }
220    
221          if (pEngine) pEngine->Enable();          if (pEngine) pEngine->Enable();
# Line 266  namespace LinuxSampler { namespace gig { Line 271  namespace LinuxSampler { namespace gig {
271          AudioDeviceChannelRight = 1;          AudioDeviceChannelRight = 1;
272          pOutputLeft             = pAudioOut->Channel(0)->Buffer();          pOutputLeft             = pAudioOut->Channel(0)->Buffer();
273          pOutputRight            = pAudioOut->Channel(1)->Buffer();          pOutputRight            = pAudioOut->Channel(1)->Buffer();
274            MidiInputPort::AddSysexListener(pEngine);
275      }      }
276    
277      void EngineChannel::DisconnectAudioOutputDevice() {      void EngineChannel::DisconnectAudioOutputDevice() {

Legend:
Removed from v.781  
changed lines
  Added in v.880

  ViewVC Help
Powered by ViewVC