mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
respect audio thread pool size setting
This commit is contained in:
parent
c4e435a166
commit
d2ed3caf02
2 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue