Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 136:a859b87162ca
* beginnings of drag up/down in layers as appropriate
author | Chris Cannam |
---|---|
date | Mon, 21 Aug 2006 16:26:35 +0000 |
parents | e98130764635 |
children | 10a82b2bbb8b |
comparison
equal
deleted
inserted
replaced
135:e98130764635 | 136:a859b87162ca |
---|---|
2785 | 2785 |
2786 float dist = max - min; | 2786 float dist = max - min; |
2787 | 2787 |
2788 int n = 0; | 2788 int n = 0; |
2789 defaultStep = 0; | 2789 defaultStep = 0; |
2790 bool haveDefault = false; | |
2790 float s2 = sqrtf(sqrtf(2)); | 2791 float s2 = sqrtf(sqrtf(2)); |
2791 while (dist > min) { | 2792 while (dist > min) { |
2792 if (max >= m_initialMaxFrequency) { | 2793 if (!haveDefault && max <= m_initialMaxFrequency) { |
2793 defaultStep = n; | 2794 defaultStep = n; |
2795 haveDefault = true; | |
2794 } | 2796 } |
2795 ++n; | 2797 ++n; |
2796 dist /= s2; | 2798 dist /= s2; |
2797 max = min + dist; | 2799 max = min + dist; |
2798 } | 2800 } |