Mercurial > hg > easaier-soundaccess
diff 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 |
line wrap: on
line diff
--- a/layer/WaveformLayer.cpp Tue Nov 27 13:26:04 2007 +0000 +++ b/layer/WaveformLayer.cpp Wed Nov 28 13:03:45 2007 +0000 @@ -735,7 +735,7 @@ if (maxIndex > index && maxIndex < otherChannelRanges->size()) { // let's not concern ourselves about the mean - range.min = min + range.min = MIN (range.min, -fabsf((*otherChannelRanges)[maxIndex].max)); } @@ -979,7 +979,7 @@ max = float(imax)/1000; } - int db = int(AudioLevel::multiplier_to_dB(max(fabsf(range.min), + int db = int(AudioLevel::multiplier_to_dB(MAX(fabsf(range.min), fabsf(range.max))) * 100); @@ -1039,7 +1039,7 @@ if (m_scale == LinearScale) { return paint.fontMetrics().width("0.0") + 13; } else { - return max(paint.fontMetrics().width(tr("0dB")), + return MAX(paint.fontMetrics().width(tr("0dB")), paint.fontMetrics().width(tr("-Inf"))) + 13; } } @@ -1192,31 +1192,31 @@ return Layer::toXmlString(indent, extraAttributes + " " + s); } -QString -WaveformLayer::toEasaierXmlString(QString indent, QString extraAttributes) const -{ - QString s; - - s += QString("gain=\"%1\" " - "colour=\"%2\" " - "showMeans=\"%3\" " - "greyscale=\"%4\" " - "channelMode=\"%5\" " - "channel=\"%6\" " - "scale=\"%7\" " - "aggressive=\"%8\" " - "autoNormalize=\"%9\"") - .arg(m_gain) - .arg(encodeColour(m_colour)) - .arg(m_showMeans) - .arg(m_greyscale) - .arg(m_channelMode) - .arg(m_channel) - .arg(m_scale) - .arg(m_aggressive) - .arg(m_autoNormalize); - - return Layer::toEasaierXmlString(indent, extraAttributes + " " + s); +QString +WaveformLayer::toEasaierXmlString(QString indent, QString extraAttributes) const +{ + QString s; + + s += QString("gain=\"%1\" " + "colour=\"%2\" " + "showMeans=\"%3\" " + "greyscale=\"%4\" " + "channelMode=\"%5\" " + "channel=\"%6\" " + "scale=\"%7\" " + "aggressive=\"%8\" " + "autoNormalize=\"%9\"") + .arg(m_gain) + .arg(encodeColour(m_colour)) + .arg(m_showMeans) + .arg(m_greyscale) + .arg(m_channelMode) + .arg(m_channel) + .arg(m_scale) + .arg(m_aggressive) + .arg(m_autoNormalize); + + return Layer::toEasaierXmlString(indent, extraAttributes + " " + s); } void