fix math bug with numthreads computation
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 24 Jun 2010 14:17:09 +0000 (14:17 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 24 Jun 2010 14:17:09 +0000 (14:17 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7297 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/graph.cc

index 54e619aef89d73adfed11e49fab87392df529f43..5b6a42437b12932b3ef16c77e0aa0b414fe7caa8 100644 (file)
@@ -63,11 +63,11 @@ Graph::Graph (Session & session)
         int pu = Config->get_processor_usage ();
 
         if (pu < 0) {
-                /* use "pu" less cores for DSP than appear to be available
+                /* pu is negative: use "pu" less cores for DSP than appear to be available
                  */
 
-                if (pu < num_threads) {
-                        num_threads += pu; // pu is negative
+                if (-pu < num_threads) {
+                        num_threads += pu; 
                 } else {
                         num_threads = 1;
                 }