comparison layer/WaveformLayer.cpp @ 324:1f67b110c1a3

* fix pane layout problem; fix waveform butterfly mode
author Chris Cannam
date Wed, 07 Nov 2007 16:52:52 +0000
parents 984c1975f1ff
children 2f83b6e3b8ca 64e84e5efb76
comparison
equal deleted inserted replaced
323:267586900360 324:1f67b110c1a3
751 meanTop = std::min(r0, r1); 751 meanTop = std::min(r0, r1);
752 if (mixingChannels) rangeBottom = meanTop; 752 if (mixingChannels) rangeBottom = meanTop;
753 else rangeBottom = AudioLevel::multiplier_to_preview(range.absmean * gain, m); 753 else rangeBottom = AudioLevel::multiplier_to_preview(range.absmean * gain, m);
754 meanBottom = rangeBottom; 754 meanBottom = rangeBottom;
755 } else { 755 } else {
756 rangeBottom = AudioLevel::multiplier_to_preview(range.min * gain, m * greyLevels); 756 rangeBottom = -AudioLevel::multiplier_to_preview(range.min * gain, m * greyLevels);
757 rangeTop = AudioLevel::multiplier_to_preview(range.max * gain, m * greyLevels); 757 rangeTop = AudioLevel::multiplier_to_preview(range.max * gain, m * greyLevels);
758 meanBottom = -AudioLevel::multiplier_to_preview(range.absmean * gain, m); 758 meanBottom = -AudioLevel::multiplier_to_preview(range.absmean * gain, m);
759 meanTop = AudioLevel::multiplier_to_preview(range.absmean * gain, m); 759 meanTop = AudioLevel::multiplier_to_preview(range.absmean * gain, m);
760 } 760 }
761 break; 761 break;
994 case dBScale: 994 case dBScale:
995 vy = dBscale(value, m); 995 vy = dBscale(value, m);
996 break; 996 break;
997 } 997 }
998 998
999 // std::cerr << "mergingChannels= " << mergingChannels << ", channel = " << channel << ", value = " << value << ", vy = " << vy << std::endl;
1000
999 return my - vy; 1001 return my - vy;
1000 } 1002 }
1001 1003
1002 float 1004 float
1003 WaveformLayer::getValueForY(const View *v, int y, size_t &channel) const 1005 WaveformLayer::getValueForY(const View *v, int y, size_t &channel) const