comparison layer/WaveformLayer.cpp @ 191:be6d31baecb9

compilation under linux - kunbuntu V7.10 (without video support)
author lbajardsilogic
date Wed, 28 Nov 2007 13:03:45 +0000
parents 61681a2bc1e6
children
comparison
equal deleted inserted replaced
190:61681a2bc1e6 191:be6d31baecb9
733 range.absmean = (range.absmean + 733 range.absmean = (range.absmean +
734 (*otherChannelRanges)[index].absmean) / 2; 734 (*otherChannelRanges)[index].absmean) / 2;
735 735
736 if (maxIndex > index && maxIndex < otherChannelRanges->size()) { 736 if (maxIndex > index && maxIndex < otherChannelRanges->size()) {
737 // let's not concern ourselves about the mean 737 // let's not concern ourselves about the mean
738 range.min = min 738 range.min = MIN
739 (range.min, 739 (range.min,
740 -fabsf((*otherChannelRanges)[maxIndex].max)); 740 -fabsf((*otherChannelRanges)[maxIndex].max));
741 } 741 }
742 } 742 }
743 743
977 singleValue = (imin == imax); 977 singleValue = (imin == imax);
978 min = float(imin)/1000; 978 min = float(imin)/1000;
979 max = float(imax)/1000; 979 max = float(imax)/1000;
980 } 980 }
981 981
982 int db = int(AudioLevel::multiplier_to_dB(max(fabsf(range.min), 982 int db = int(AudioLevel::multiplier_to_dB(MAX(fabsf(range.min),
983 fabsf(range.max))) 983 fabsf(range.max)))
984 * 100); 984 * 100);
985 985
986 if (!singleValue) { 986 if (!singleValue) {
987 text += tr("\n%1\t%2 - %3 (%4 dB peak)") 987 text += tr("\n%1\t%2 - %3 (%4 dB peak)")
1037 WaveformLayer::getVerticalScaleWidth(View *, QPainter &paint) const 1037 WaveformLayer::getVerticalScaleWidth(View *, QPainter &paint) const
1038 { 1038 {
1039 if (m_scale == LinearScale) { 1039 if (m_scale == LinearScale) {
1040 return paint.fontMetrics().width("0.0") + 13; 1040 return paint.fontMetrics().width("0.0") + 13;
1041 } else { 1041 } else {
1042 return max(paint.fontMetrics().width(tr("0dB")), 1042 return MAX(paint.fontMetrics().width(tr("0dB")),
1043 paint.fontMetrics().width(tr("-Inf"))) + 13; 1043 paint.fontMetrics().width(tr("-Inf"))) + 13;
1044 } 1044 }
1045 } 1045 }
1046 1046
1047 void 1047 void