Mercurial > hg > svgui
diff layer/WaveformLayer.cpp @ 79:19bf27e4fb29
* Replace crash with warning when a transform could not be automatically
re-run
* More sensible default paths for Vamp plugin lookup (at least on Linux and
OS/X)
* A start to making the y coords for time value layers etc align
* Set sensible y coords for text labels in time instant and value layers
author | Chris Cannam |
---|---|
date | Thu, 13 Apr 2006 18:29:10 +0000 |
parents | 45ba0b381c5d |
children | 4b98bda7e94d |
line wrap: on
line diff
--- a/layer/WaveformLayer.cpp Wed Apr 12 09:59:40 2006 +0000 +++ b/layer/WaveformLayer.cpp Thu Apr 13 18:29:10 2006 +0000 @@ -336,6 +336,23 @@ return completion; } +bool +WaveformLayer::getValueExtents(float &min, float &max, QString &unit) const +{ + if (m_scale == LinearScale) { + min = 0.0; + max = 1.0; + unit = "V"; + } else if (m_scale == MeterScale) { + return false; //!!! + } else { + min = AudioLevel::multiplier_to_dB(0.0); + max = AudioLevel::multiplier_to_dB(1.0); + unit = "dB"; + } + return true; +} + int WaveformLayer::dBscale(float sample, int m) const {