Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
78:967193b6c7aa | 79:19bf27e4fb29 |
---|---|
332 { | 332 { |
333 int completion = 100; | 333 int completion = 100; |
334 if (!m_model || !m_model->isOK()) return completion; | 334 if (!m_model || !m_model->isOK()) return completion; |
335 if (m_model->isReady(&completion)) return 100; | 335 if (m_model->isReady(&completion)) return 100; |
336 return completion; | 336 return completion; |
337 } | |
338 | |
339 bool | |
340 WaveformLayer::getValueExtents(float &min, float &max, QString &unit) const | |
341 { | |
342 if (m_scale == LinearScale) { | |
343 min = 0.0; | |
344 max = 1.0; | |
345 unit = "V"; | |
346 } else if (m_scale == MeterScale) { | |
347 return false; //!!! | |
348 } else { | |
349 min = AudioLevel::multiplier_to_dB(0.0); | |
350 max = AudioLevel::multiplier_to_dB(1.0); | |
351 unit = "dB"; | |
352 } | |
353 return true; | |
337 } | 354 } |
338 | 355 |
339 int | 356 int |
340 WaveformLayer::dBscale(float sample, int m) const | 357 WaveformLayer::dBscale(float sample, int m) const |
341 { | 358 { |