/[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 354 by schoenebeck, Sat Jan 29 15:17:59 2005 UTC revision 376 by senkov, Sat Feb 12 23:48:50 2005 UTC
# Line 26  Line 26 
26  #include "EGADSR.h"  #include "EGADSR.h"
27    
28  #include "Engine.h"  #include "Engine.h"
29  #include <malloc.h>  
30    #if defined(__APPLE__)
31    # include <stdlib.h>
32    #else
33    # include <malloc.h>
34    #endif
35    
36  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
37    
# Line 267  namespace LinuxSampler { namespace gig { Line 272  namespace LinuxSampler { namespace gig {
272          for (::gig::Region* pRegion = pInstrument->GetFirstRegion(); pRegion; pRegion = pInstrument->GetNextRegion())          for (::gig::Region* pRegion = pInstrument->GetFirstRegion(); pRegion; pRegion = pInstrument->GetNextRegion())
273              if (pRegion->KeyGroup) ActiveKeyGroups[pRegion->KeyGroup] = NULL;              if (pRegion->KeyGroup) ActiveKeyGroups[pRegion->KeyGroup] = NULL;
274    
275            InstrumentIdxName = pInstrument->pInfo->Name;
276          InstrumentStat = 100;          InstrumentStat = 100;
277    
278          // inform audio driver for the need of two channels          // inform audio driver for the need of two channels
# Line 353  namespace LinuxSampler { namespace gig { Line 359  namespace LinuxSampler { namespace gig {
359    
360          // (re)allocate synthesis parameter matrix          // (re)allocate synthesis parameter matrix
361          if (pSynthesisParameters[0]) free(pSynthesisParameters[0]);          if (pSynthesisParameters[0]) free(pSynthesisParameters[0]);
362    
363            #if defined(__APPLE__)
364            pSynthesisParameters[0] = (float *) malloc(Event::destination_count * sizeof(float) * pAudioOut->MaxSamplesPerCycle());
365            #else
366          pSynthesisParameters[0] = (float *) memalign(16,(Event::destination_count * sizeof(float) * pAudioOut->MaxSamplesPerCycle()));          pSynthesisParameters[0] = (float *) memalign(16,(Event::destination_count * sizeof(float) * pAudioOut->MaxSamplesPerCycle()));
367            #endif
368          for (int dst = 1; dst < Event::destination_count; dst++)          for (int dst = 1; dst < Event::destination_count; dst++)
369              pSynthesisParameters[dst] = pSynthesisParameters[dst - 1] + pAudioOut->MaxSamplesPerCycle();              pSynthesisParameters[dst] = pSynthesisParameters[dst - 1] + pAudioOut->MaxSamplesPerCycle();
370    
# Line 1171  namespace LinuxSampler { namespace gig { Line 1182  namespace LinuxSampler { namespace gig {
1182          return InstrumentFile;          return InstrumentFile;
1183      }      }
1184    
1185        String Engine::InstrumentName() {
1186            return InstrumentIdxName;
1187        }
1188    
1189      int Engine::InstrumentIndex() {      int Engine::InstrumentIndex() {
1190          return InstrumentIdx;          return InstrumentIdx;
1191      }      }
# Line 1184  namespace LinuxSampler { namespace gig { Line 1199  namespace LinuxSampler { namespace gig {
1199      }      }
1200    
1201      String Engine::Version() {      String Engine::Version() {
1202          String s = "$Revision: 1.22 $";          String s = "$Revision: 1.24 $";
1203          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
1204      }      }
1205    

Legend:
Removed from v.354  
changed lines
  Added in v.376

  ViewVC Help
Powered by ViewVC