tweaks to curvetest to help track down interpolation bug at high timecodes
authorBen Loftis <ben@glw.com>
Mon, 2 Mar 2009 17:02:49 +0000 (17:02 +0000)
committerBen Loftis <ben@glw.com>
Mon, 2 Mar 2009 17:02:49 +0000 (17:02 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4714 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/curvetest.cc

index 1f432d17eba6c4ebdfbb5b3dc97a1418607f26ac..701315e8537cd8754822b7db35b334007ea4911a 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <iostream>
+#include <iomanip>
 #include <fstream>
 #include <cfloat>
 #include <unistd.h>
@@ -33,17 +34,16 @@ using namespace PBD;
 int
 curvetest (string filename)
 {
+       // needed to initialize ID objects/counter used
+       // by Curve et al.
+       PBD::ID::init ();
+
        ifstream in (filename.c_str());
        stringstream line;
        Curve c (-1.0, +1.0, 0, true);
        double minx = DBL_MAX;
        double maxx = DBL_MIN;
 
-       // needed to initialize ID objects/counter used
-       // by Curve et al.
-
-       PBD::ID::init ();
-
        while (in) {
                double x, y;
 
@@ -71,7 +71,7 @@ curvetest (string filename)
        c.get_vector (minx, maxx, foo, 1024);
        
        for (int i = 0; i < 1024; ++i) {
-               cout << minx + (((double) i / 1024.0) * (maxx - minx)) << ' ' << foo[i] << endl;
+               cout << setw(20) << setprecision(20) << minx + (((double) i / 1024.0) * (maxx - minx)) << ' ' << foo[i] << endl;
        }
        
        return 0;