Mercurial > hg > svapp
diff audio/AudioCallbackRecordTarget.cpp @ 580:298d864113f0 3.0-integration
Fix flickery level meters
author | Chris Cannam |
---|---|
date | Wed, 11 Jan 2017 17:46:37 +0000 |
parents | c2e27ad7f408 |
children | 8cc291b13f2b |
line wrap: on
line diff
--- a/audio/AudioCallbackRecordTarget.cpp Thu Jan 05 13:04:30 2017 +0000 +++ b/audio/AudioCallbackRecordTarget.cpp Wed Jan 11 17:46:37 2017 +0000 @@ -34,7 +34,8 @@ m_buffers(0), m_bufferCount(0), m_inputLeft(0.f), - m_inputRight(0.f) + m_inputRight(0.f), + m_levelsSet(false) { m_viewManager->setAudioRecordTarget(this); @@ -193,6 +194,7 @@ { if (left > m_inputLeft) m_inputLeft = left; if (right > m_inputRight) m_inputRight = right; + m_levelsSet = true; } bool @@ -202,7 +204,7 @@ right = m_inputRight; m_inputLeft = 0.f; m_inputRight = 0.f; - return true; + return m_levelsSet; } void