/[svn]/linuxsampler/trunk/src/lib/fileloader/libgig/gig.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/lib/fileloader/libgig/gig.cpp

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

revision 231 by schoenebeck, Tue Apr 27 09:21:58 2004 UTC revision 232 by schoenebeck, Sun Sep 5 00:55:44 2004 UTC
# Line 841  namespace gig { Line 841  namespace gig {
841                  case curve_type_nonlinear:                  case curve_type_nonlinear:
842                      for (int velocity = 0; velocity < 128; velocity++) {                      for (int velocity = 0; velocity < 128; velocity++) {
843                          pVelocityAttenuationTable[velocity] =                          pVelocityAttenuationTable[velocity] =
844                              GIG_VELOCITY_TRANSFORM_NONLINEAR((double)(velocity+1),(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling);                              GIG_VELOCITY_TRANSFORM_NONLINEAR(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling));
845                          if      (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0;                          if      (pVelocityAttenuationTable[velocity] > 1.0)   pVelocityAttenuationTable[velocity] = 1.0;
846                          else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0;                          else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0;
847                       }                       }
848                       break;                       break;
849                  case curve_type_linear:                  case curve_type_linear:
850                      for (int velocity = 0; velocity < 128; velocity++) {                      for (int velocity = 0; velocity < 128; velocity++) {
851                          pVelocityAttenuationTable[velocity] =                          pVelocityAttenuationTable[velocity] =
852                              GIG_VELOCITY_TRANSFORM_LINEAR((double)velocity,(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling);                              GIG_VELOCITY_TRANSFORM_LINEAR(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling));
853                          if      (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0;                          if      (pVelocityAttenuationTable[velocity] > 1.0)   pVelocityAttenuationTable[velocity] = 1.0;
854                          else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0;                          else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0;
855                      }                      }
856                      break;                      break;
857                  case curve_type_special:                  case curve_type_special:
858                      for (int velocity = 0; velocity < 128; velocity++) {                      for (int velocity = 0; velocity < 128; velocity++) {
859                          pVelocityAttenuationTable[velocity] =                          pVelocityAttenuationTable[velocity] =
860                              GIG_VELOCITY_TRANSFORM_SPECIAL((double)(velocity+1),(double)(VelocityResponseDepth+1),(double)VelocityResponseCurveScaling);                              GIG_VELOCITY_TRANSFORM_SPECIAL(((double)velocity),((double)VelocityResponseDepth),((double)VelocityResponseCurveScaling));
861                          if      (pVelocityAttenuationTable[velocity] > 1.0) pVelocityAttenuationTable[velocity] = 1.0;                          if      (pVelocityAttenuationTable[velocity] > 1.0)   pVelocityAttenuationTable[velocity] = 1.0;
862                          else if (pVelocityAttenuationTable[velocity] < 0.0) pVelocityAttenuationTable[velocity] = 0.0;                          else if (pVelocityAttenuationTable[velocity] < 1e-15) pVelocityAttenuationTable[velocity] = 0.0;
863                      }                      }
864                      break;                      break;
865                  case curve_type_unknown:                  case curve_type_unknown:

Legend:
Removed from v.231  
changed lines
  Added in v.232

  ViewVC Help
Powered by ViewVC