Spectrum: allow zero decay so history (including max hold) is kept forever

pull/263/head
f4exb 2018-10-17 13:35:04 +02:00
rodzic 2f955ba979
commit 9eb08541ee
1 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -371,11 +371,11 @@ void GLSpectrum::updateHistogram(const std::vector<Real>& spectrum)
{
quint8* b = m_histogram;
quint8* h = m_histogramHoldoff;
int sub = 1;
int sub = 0; // was 1;
int fftMulSize = 100 * m_fftSize;
if(m_decay > 0)
sub += m_decay;
//if(m_decay > 0)
sub += m_decay; // allow zero decay so history (including max hold) is kept forever
if (m_displayHistogram || m_displayMaxHold)
{
@ -385,7 +385,7 @@ void GLSpectrum::updateHistogram(const std::vector<Real>& spectrum)
{
for (int i = 0; i < fftMulSize; i++)
{
if((*b>>4) > 0) // *b > 16
if (*b > 16) // was 20
{
*b = *b - sub;
}