respect audio thread pool size setting

This commit is contained in:
Zach Pomerantz 2016-12-07 13:40:22 -05:00
parent c4e435a166
commit d2ed3caf02
2 changed files with 6 additions and 3 deletions

View file

@ -512,9 +512,12 @@ void AudioMixer::parseSettingsObject(const QJsonObject &settingsObject) {
const QString AUTO_THREADS = "auto_threads";
bool autoThreads = audioThreadingGroupObject[AUTO_THREADS].toBool();
if (!autoThreads) {
bool ok;
const QString NUM_THREADS = "num_threads";
int numThreads = audioThreadingGroupObject[NUM_THREADS].toInt();
_slavePool.setNumThreads(numThreads);
int numThreads = audioThreadingGroupObject[NUM_THREADS].toString().toInt(&ok);
if (ok) {
_slavePool.setNumThreads(numThreads);
}
}
}

View file

@ -113,7 +113,7 @@ void AudioMixerSlavePool::setNumThreads(int numThreads) {
int clampedThreads = std::min(std::max(1, numThreads), maxThreads);
if (clampedThreads != numThreads) {
qWarning("%s: clamped to %d (was %d)", __FUNCTION__, numThreads, clampedThreads);
qWarning("%s: clamped to %d (was %d)", __FUNCTION__, clampedThreads, numThreads);
numThreads = clampedThreads;
}
}