/[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 831 by persson, Sat Jan 28 16:55:30 2006 UTC revision 832 by persson, Sun Feb 5 10:24:05 2006 UTC
# Line 1557  namespace LinuxSampler { namespace gig { Line 1557  namespace LinuxSampler { namespace gig {
1557      }      }
1558    
1559      String Engine::Version() {      String Engine::Version() {
1560          String s = "$Revision: 1.58 $";          String s = "$Revision: 1.59 $";
1561          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
1562      }      }
1563    
1564      // static constant initializers      // static constant initializers
1565      const float* Engine::VolumeCurve(InitVolumeCurve());      const float* Engine::VolumeCurve(InitVolumeCurve());
1566      const float* Engine::PanCurve(InitPanCurve());      const float* Engine::PanCurve(InitPanCurve());
1567        const float* Engine::CrossfadeCurve(InitCrossfadeCurve());
1568    
1569      float* Engine::InitVolumeCurve() {      float* Engine::InitVolumeCurve() {
1570          // line-segment approximation          // line-segment approximation
# Line 1584  namespace LinuxSampler { namespace gig { Line 1585  namespace LinuxSampler { namespace gig {
1585          return InitCurve(segments, 129);          return InitCurve(segments, 129);
1586      }      }
1587    
1588        float* Engine::InitCrossfadeCurve() {
1589            // line-segment approximation
1590            const float segments[] = {
1591                0, 0, 1, 0.03, 10, 0.1, 51, 0.58, 127, 1
1592            };
1593            return InitCurve(segments);
1594        }
1595    
1596      float* Engine::InitCurve(const float* segments, int size) {      float* Engine::InitCurve(const float* segments, int size) {
1597          float* y = new float[size];          float* y = new float[size];
1598          for (int x = 0 ; x < size ; x++) {          for (int x = 0 ; x < size ; x++) {

Legend:
Removed from v.831  
changed lines
  Added in v.832

  ViewVC Help
Powered by ViewVC