comparison layer/SpectrogramLayer.cpp @ 43:78515b1e29eb

* Rejig project file a bit to do pkg-config detection &c and change some HAVE_* symbol names accordingly * Add selection move/resize/delete * First stubs for add layer / pane commands
author Chris Cannam
date Wed, 01 Mar 2006 18:13:01 +0000
parents 1bdf285c4eac
children ad214997dddb
comparison
equal deleted inserted replaced
42:1bdf285c4eac 43:78515b1e29eb
1325 m_layer.m_cache = new Cache; 1325 m_layer.m_cache = new Cache;
1326 } 1326 }
1327 1327
1328 m_layer.m_cache->resize(width, height); 1328 m_layer.m_cache->resize(width, height);
1329 m_layer.setCacheColourmap(); 1329 m_layer.setCacheColourmap();
1330 m_layer.m_cache->reset(); 1330 //!!! m_layer.m_cache->reset();
1331 1331
1332 // We don't need a lock when writing to or reading from 1332 // We don't need a lock when writing to or reading from
1333 // the pixels in the cache. We do need to ensure we have 1333 // the pixels in the cache. We do need to ensure we have
1334 // the width and height of the cache and the FFT 1334 // the width and height of the cache and the FFT
1335 // parameters known before we unlock, in case they change 1335 // parameters known before we unlock, in case they change
2163 } 2163 }
2164 2164
2165 if (haveValues) { 2165 if (haveValues) {
2166 float dbMin = AudioLevel::multiplier_to_dB(magMin); 2166 float dbMin = AudioLevel::multiplier_to_dB(magMin);
2167 float dbMax = AudioLevel::multiplier_to_dB(magMax); 2167 float dbMax = AudioLevel::multiplier_to_dB(magMax);
2168 QString dbMinString;
2169 QString dbMaxString;
2170 if (dbMin == AudioLevel::DB_FLOOR) {
2171 dbMinString = tr("-Inf");
2172 } else {
2173 dbMinString = QString("%1").arg(lrintf(dbMin));
2174 }
2175 if (dbMax == AudioLevel::DB_FLOOR) {
2176 dbMaxString = tr("-Inf");
2177 } else {
2178 dbMaxString = QString("%1").arg(lrintf(dbMax));
2179 }
2168 if (lrintf(dbMin) != lrintf(dbMax)) { 2180 if (lrintf(dbMin) != lrintf(dbMax)) {
2169 text += tr("dB:\t%1 - %2").arg(lrintf(dbMin)).arg(lrintf(dbMax)); 2181 text += tr("dB:\t%1 - %2").arg(lrintf(dbMin)).arg(lrintf(dbMax));
2170 } else { 2182 } else {
2171 text += tr("dB:\t%1").arg(lrintf(dbMin)); 2183 text += tr("dB:\t%1").arg(lrintf(dbMin));
2172 } 2184 }