/[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 1039 by persson, Sat Feb 3 20:46:44 2007 UTC revision 1298 by iliev, Fri Aug 17 12:55:37 2007 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, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2007 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 159  namespace LinuxSampler { namespace gig { Line 159  namespace LinuxSampler { namespace gig {
159       * This method will then actually start to load the instrument and block       * This method will then actually start to load the instrument and block
160       * the calling thread until loading was completed.       * the calling thread until loading was completed.
161       *       *
      * @returns detailed description of the method call result  
162       * @see PrepareLoadInstrument()       * @see PrepareLoadInstrument()
163       */       */
164      void EngineChannel::LoadInstrument() {      void EngineChannel::LoadInstrument() {
# Line 192  namespace LinuxSampler { namespace gig { Line 191  namespace LinuxSampler { namespace gig {
191              instrid.Index     = InstrumentIdx;              instrid.Index     = InstrumentIdx;
192              newInstrument = Engine::instruments.Borrow(instrid, this);              newInstrument = Engine::instruments.Borrow(instrid, this);
193              if (!newInstrument) {              if (!newInstrument) {
194                  InstrumentStat = -1;                  throw InstrumentManagerException("resource was not created");
                 dmsg(1,("no instrument loaded!!!\n"));  
                 exit(EXIT_FAILURE);  
195              }              }
196          }          }
197          catch (RIFF::Exception e) {          catch (RIFF::Exception e) {
# Line 202  namespace LinuxSampler { namespace gig { Line 199  namespace LinuxSampler { namespace gig {
199              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;
200              throw Exception(msg);              throw Exception(msg);
201          }          }
202          catch (InstrumentResourceManagerException e) {          catch (InstrumentManagerException e) {
203              InstrumentStat = -3;              InstrumentStat = -3;
204              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();
205              throw Exception(msg);              throw Exception(msg);
# Line 221  namespace LinuxSampler { namespace gig { Line 218  namespace LinuxSampler { namespace gig {
218    
219          if (pEngine) pEngine->ChangeInstrument(this, newInstrument);          if (pEngine) pEngine->ChangeInstrument(this, newInstrument);
220          else pInstrument = newInstrument;          else pInstrument = newInstrument;
221            
222            StatusChanged(true);
223      }      }
224    
225      /**      /**
# Line 338  namespace LinuxSampler { namespace gig { Line 337  namespace LinuxSampler { namespace gig {
337              default:              default:
338                  throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel));                  throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel));
339          }          }
340    
341            bStatusChanged = true;
342      }      }
343    
344      int EngineChannel::OutputChannel(uint EngineAudioChannel) {      int EngineChannel::OutputChannel(uint EngineAudioChannel) {
# Line 390  namespace LinuxSampler { namespace gig { Line 391  namespace LinuxSampler { namespace gig {
391          }          }
392          fxSends.push_back(pFxSend);          fxSends.push_back(pFxSend);
393          if (pEngine) pEngine->Enable();          if (pEngine) pEngine->Enable();
394            fireFxSendCountChanged(iSamplerChannelIndex, GetFxSendCount());
395            
396          return pFxSend;          return pFxSend;
397      }      }
398    
# Line 427  namespace LinuxSampler { namespace gig { Line 430  namespace LinuxSampler { namespace gig {
430              }              }
431          }          }
432          if (pEngine) pEngine->Enable();          if (pEngine) pEngine->Enable();
433            fireFxSendCountChanged(iSamplerChannelIndex, GetFxSendCount());
434      }      }
435    
436      /**      /**
# Line 633  namespace LinuxSampler { namespace gig { Line 637  namespace LinuxSampler { namespace gig {
637          MidiVolume     = 1.0;          MidiVolume     = 1.0;
638          GlobalPanLeft  = 1.0f;          GlobalPanLeft  = 1.0f;
639          GlobalPanRight = 1.0f;          GlobalPanRight = 1.0f;
640            GlobalTranspose = 0;
641          // set all MIDI controller values to zero          // set all MIDI controller values to zero
642          memset(ControllerTable, 0x00, 129);          memset(ControllerTable, 0x00, 129);
643            // reset all FX Send levels
644            for (
645                std::vector<FxSend*>::iterator iter = fxSends.begin();
646                iter != fxSends.end(); iter++
647            ) {
648                (*iter)->Reset();
649            }
650      }      }
651    
652      /**      /**

Legend:
Removed from v.1039  
changed lines
  Added in v.1298

  ViewVC Help
Powered by ViewVC