Skip to content

Commit e547342

Browse files
committed
Updated Config::recordersCount.
1 parent b9fe590 commit e547342

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sources/config.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ std::vector<FrequencyRange> Config::ignoredRanges() const {
4242
return ranges;
4343
}
4444
int Config::recordersCount() const {
45-
const auto max_workers = static_cast<int>(std::thread::hardware_concurrency() / 2);
45+
const auto max_workers = static_cast<int>(std::thread::hardware_concurrency());
46+
const auto auto_workers = max_workers / 2;
4647
const auto workers = std::max(0, std::min(m_fileConfig.workers, max_workers));
47-
return workers == 0 ? max_workers : workers;
48+
return workers == 0 ? auto_workers : workers;
4849
}
4950
Frequency Config::recordingBandwidth() const { return m_fileConfig.recording.min_sample_rate; }
5051
std::chrono::milliseconds Config::recordingMinTime() const { return m_fileConfig.recording.min_time_ms; }

0 commit comments

Comments
 (0)