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

Diff of /libgig/trunk/src/gig.cpp

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

revision 55 by schoenebeck, Tue Apr 27 09:06:07 2004 UTC revision 231 by schoenebeck, Sun Sep 5 00:46:28 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.55  
changed lines
  Added in v.231

  ViewVC Help
Powered by ViewVC