Update of /cvsroot/audacity/audacity-src/src/effects/nyquist
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4035

Modified Files:
        Nyquist.cpp 
Log Message:
Fix problem where Nyquist effects would not execute correctly when the decimal 
separator was set to a comma rather than a decimal point

Index: Nyquist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/nyquist/Nyquist.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- Nyquist.cpp 16 Aug 2009 14:44:20 -0000      1.80
+++ Nyquist.cpp 5 Sep 2009 21:28:37 -0000       1.81
@@ -594,9 +594,13 @@
 
    for (unsigned int j = 0; j < mControls.GetCount(); j++) {
       if (mControls[j].type == NYQ_CTRL_REAL) {
-         cmd += wxString::Format(wxT("(setf %s %f)\n"),
+         // We use Internat::ToString() rather than "%f" here because we
+         // always have to use the dot as decimal separator when giving
+         // numbers to Nyquist, whereas using "%f" will use the user's
+         // decimal separator which may be a comma in some countries.
+         cmd += wxString::Format(wxT("(setf %s %s)\n"),
                                  mControls[j].var.c_str(),
-                                 mControls[j].val);
+                                 Internat::ToString(mControls[j].val));
       }
       else if (mControls[j].type == NYQ_CTRL_INT || 
             mControls[j].type == NYQ_CTRL_CHOICE) {


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to