From ea2f5f170bdad35989241662f1d1fe875d5a24a3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 24 Jun 2010 14:17:09 +0000 Subject: [PATCH] fix math bug with numthreads computation git-svn-id: svn://localhost/ardour2/branches/3.0@7297 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/graph.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 54e619aef8..5b6a42437b 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -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; }