comparison layer/NoteLayer.cpp @ 1391:c39f2d439d59 spectrogramparam

Toward highlighting peaks on spectrum
author Chris Cannam
date Tue, 13 Nov 2018 15:16:48 +0000
parents 1d7921b1852f
children c8a6fd3f9dff
comparison
equal deleted inserted replaced
1390:3c99083a4d83 1391:c39f2d439d59
419 frame - int(prevPoints.begin()->frame)) { 419 frame - int(prevPoints.begin()->frame)) {
420 usePoints = nextPoints; 420 usePoints = nextPoints;
421 } 421 }
422 422
423 if (!usePoints.empty()) { 423 if (!usePoints.empty()) {
424 int fuzz = 2; 424 int fuzz = ViewManager::scalePixelSize(2);
425 int px = v->getXForFrame(usePoints.begin()->frame); 425 int px = v->getXForFrame(usePoints.begin()->frame);
426 if ((px > x && px - x > fuzz) || 426 if ((px > x && px - x > fuzz) ||
427 (px < x && x - px > fuzz + 1)) { 427 (px < x && x - px > fuzz + 1)) {
428 usePoints.clear(); 428 usePoints.clear();
429 } 429 }