mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
DSP load fall-off from 100%.
get_dsp_load_unbound() will return large values >100% for testing, but actual fall-off is from 100%.
This commit is contained in:
parent
9fc3883cbb
commit
01105dc971
1 changed files with 3 additions and 2 deletions
|
|
@ -68,12 +68,13 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
const float load = elapsed_time_us() / (float)m_max_time_us;
|
||||
const float load = (float) elapsed_time_us() / (float)m_max_time_us;
|
||||
if (load > m_dsp_load || load > 1.0) {
|
||||
m_dsp_load = load;
|
||||
} else {
|
||||
const float alpha = 0.2f * (m_max_time_us * 1e-6f);
|
||||
m_dsp_load = m_dsp_load + alpha * (load - m_dsp_load) + 1e-12;
|
||||
m_dsp_load = std::min (1.f, m_dsp_load);
|
||||
m_dsp_load += alpha * (load - m_dsp_load) + 1e-12;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue