fix math bug with numthreads computation

git-svn-id: svn://localhost/ardour2/branches/3.0@7297 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-06-24 14:17:09 +00:00
parent 0f5bdd666f
commit ea2f5f170b

View 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;
}