Update of /cvsroot/audacity/audacity-src/src/effects
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv19466/src/effects

Modified Files:
        Amplify.cpp 
Log Message:
When opened, now shows the gain you will get.
Increased max/min to +-50dB.

Index: Amplify.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Amplify.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- Amplify.cpp 3 Jul 2006 19:15:47 -0000       1.34
+++ Amplify.cpp 20 Sep 2006 22:33:27 -0000      1.35
@@ -117,8 +117,8 @@
 // AmplifyDialog
 //----------------------------------------------------------------------------
 
-#define AMP_MIN -240
-#define AMP_MAX 240
+#define AMP_MIN -500
+#define AMP_MAX 500
 
 // WDR: event table for AmplifyDialog
 
@@ -232,6 +232,10 @@
 {
    wxSlider *slider;
 
+   // limit range of gain
+   double dB = TrapDouble(200*log10(ratio), AMP_MIN, AMP_MAX)/10.0;
+   ratio = pow(10.0, dB/20.0);
+
    slider = GetAmpSlider();
    if (slider)
       slider->SetValue((int)(200*log10(ratio)+0.5));


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to