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

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

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

revision 80 by schoenebeck, Sun May 23 19:16:33 2004 UTC revision 133 by capela, Fri Jun 18 14:29:02 2004 UTC
# Line 62  namespace LinuxSampler { namespace gig { Line 62  namespace LinuxSampler { namespace gig {
62          pBasicFilterParameters  = NULL;          pBasicFilterParameters  = NULL;
63          pMainFilterParameters   = NULL;          pMainFilterParameters   = NULL;
64    
65            InstrumentIdx = -1;
66            InstrumentStat = -1;
67    
68          ResetInternal();          ResetInternal();
69      }      }
70    
# Line 195  namespace LinuxSampler { namespace gig { Line 198  namespace LinuxSampler { namespace gig {
198              Instruments.HandBack(pInstrument, this);              Instruments.HandBack(pInstrument, this);
199          }          }
200    
201            InstrumentFile = FileName;
202            InstrumentIdx = Instrument;
203            InstrumentStat = 0;
204    
205          // request gig instrument from instrument manager          // request gig instrument from instrument manager
206          try {          try {
207              instrument_id_t instrid;              instrument_id_t instrid;
# Line 202  namespace LinuxSampler { namespace gig { Line 209  namespace LinuxSampler { namespace gig {
209              instrid.iInstrument = Instrument;              instrid.iInstrument = Instrument;
210              pInstrument = Instruments.Borrow(instrid, this);              pInstrument = Instruments.Borrow(instrid, this);
211              if (!pInstrument) {              if (!pInstrument) {
212                    InstrumentStat = -1;
213                  dmsg(1,("no instrument loaded!!!\n"));                  dmsg(1,("no instrument loaded!!!\n"));
214                  exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
215              }              }
216          }          }
217          catch (RIFF::Exception e) {          catch (RIFF::Exception e) {
218                InstrumentStat = -2;
219              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message;
220              throw LinuxSamplerException(msg);              throw LinuxSamplerException(msg);
221          }          }
222          catch (InstrumentResourceManagerException e) {          catch (InstrumentResourceManagerException e) {
223                InstrumentStat = -3;
224              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();              String msg = "gig::Engine error: Failed to load instrument, cause: " + e.Message();
225              throw LinuxSamplerException(msg);              throw LinuxSamplerException(msg);
226          }          }
227          catch (...) {          catch (...) {
228                InstrumentStat = -4;
229              throw LinuxSamplerException("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");              throw LinuxSamplerException("gig::Engine error: Failed to load instrument, cause: Unknown exception while trying to parse gig file.");
230          }          }
231    
232            InstrumentStat = 100;
233    
234          // inform audio driver for the need of two channels          // inform audio driver for the need of two channels
235          try {          try {
236              if (pAudioOutputDevice) pAudioOutputDevice->AcquireChannels(2); // gig Engine only stereo              if (pAudioOutputDevice) pAudioOutputDevice->AcquireChannels(2); // gig Engine only stereo
# Line 690  namespace LinuxSampler { namespace gig { Line 703  namespace LinuxSampler { namespace gig {
703          return pDiskThread->GetBufferFillPercentage();          return pDiskThread->GetBufferFillPercentage();
704      }      }
705    
706        String Engine::EngineName() {
707            return "GigEngine";
708        }
709    
710        String Engine::InstrumentFileName() {
711            return InstrumentFile;
712        }
713    
714        int Engine::InstrumentIndex() {
715            return InstrumentIdx;
716        }
717    
718        int Engine::InstrumentStatus() {
719            return InstrumentStat;
720        }
721    
722      String Engine::Description() {      String Engine::Description() {
723          return "Gigasampler Engine";          return "Gigasampler Engine";
724      }      }
725    
726      String Engine::Version() {      String Engine::Version() {
727          return "0.0.1-0cvs20040423";          String s = "$Revision: 1.7 $";
728            return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
729      }      }
730    
731  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.80  
changed lines
  Added in v.133

  ViewVC Help
Powered by ViewVC