Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1.     // Overdrive
  2.     float fAmountOverdrive=(float)m_ucAmountOverdrive/255.0f; // [0,1]
  3.     int nAmount=(int)(fAmountOverdrive*10.0f);  // Cantidad de distorsión [0,10]
  4.     bool bUp;
  5.  
  6.     if(fSample>0)
  7.         bUp=true;
  8.     else
  9.         bUp=false;
  10.  
  11.     for(int i=0;i<nAmount;i++)
  12.     {
  13.         if(bUp)
  14.         {
  15.             fSample+=0.05f;
  16.  
  17.             if(fSample>=1)
  18.             {
  19.                 bUp=false;
  20.             }
  21.         }
  22.         else
  23.         {
  24.             fSample-=0.1f;
  25.  
  26.             if(fSample<=-1)
  27.             {
  28.                 bUp=true;
  29.             }
  30.         }
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement