/[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 1130 by iliev, Sun Mar 25 18:59:14 2007 UTC revision 1424 by schoenebeck, Sun Oct 14 22:00:17 2007 UTC
# Line 23  Line 23 
23    
24  #include "EngineChannel.h"  #include "EngineChannel.h"
25    
26    #include "../../common/global_private.h"
27    
28  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
29    
30      EngineChannel::EngineChannel() {      EngineChannel::EngineChannel() {
# Line 159  namespace LinuxSampler { namespace gig { Line 161  namespace LinuxSampler { namespace gig {
161       * This method will then actually start to load the instrument and block       * This method will then actually start to load the instrument and block
162       * the calling thread until loading was completed.       * the calling thread until loading was completed.
163       *       *
      * @returns detailed description of the method call result  
164       * @see PrepareLoadInstrument()       * @see PrepareLoadInstrument()
165       */       */
166      void EngineChannel::LoadInstrument() {      void EngineChannel::LoadInstrument() {
# Line 192  namespace LinuxSampler { namespace gig { Line 193  namespace LinuxSampler { namespace gig {
193              instrid.Index     = InstrumentIdx;              instrid.Index     = InstrumentIdx;
194              newInstrument = Engine::instruments.Borrow(instrid, this);              newInstrument = Engine::instruments.Borrow(instrid, this);
195              if (!newInstrument) {              if (!newInstrument) {
196                  throw InstrumentResourceManagerException("resource was not created");                  throw InstrumentManagerException("resource was not created");
197              }              }
198          }          }
199          catch (RIFF::Exception e) {          catch (RIFF::Exception e) {
200              InstrumentStat = -2;              InstrumentStat = -2;
201                StatusChanged(true);
202              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;
203              throw Exception(msg);              throw Exception(msg);
204          }          }
205          catch (InstrumentResourceManagerException e) {          catch (InstrumentManagerException e) {
206              InstrumentStat = -3;              InstrumentStat = -3;
207                StatusChanged(true);
208              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();
209              throw Exception(msg);              throw Exception(msg);
210          }          }
211          catch (...) {          catch (...) {
212              InstrumentStat = -4;              InstrumentStat = -4;
213                StatusChanged(true);
214              throw Exception("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.");
215          }          }
216    
# Line 219  namespace LinuxSampler { namespace gig { Line 223  namespace LinuxSampler { namespace gig {
223    
224          if (pEngine) pEngine->ChangeInstrument(this, newInstrument);          if (pEngine) pEngine->ChangeInstrument(this, newInstrument);
225          else pInstrument = newInstrument;          else pInstrument = newInstrument;
226            
227            StatusChanged(true);
228      }      }
229    
230      /**      /**
# Line 336  namespace LinuxSampler { namespace gig { Line 342  namespace LinuxSampler { namespace gig {
342              default:              default:
343                  throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel));                  throw AudioOutputException("Invalid engine audio channel " + ToString(EngineAudioChannel));
344          }          }
345    
346            bStatusChanged = true;
347      }      }
348    
349      int EngineChannel::OutputChannel(uint EngineAudioChannel) {      int EngineChannel::OutputChannel(uint EngineAudioChannel) {

Legend:
Removed from v.1130  
changed lines
  Added in v.1424

  ViewVC Help
Powered by ViewVC