summaryrefslogtreecommitdiff
path: root/dgedit/volumefader.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-05-02 13:04:58 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-05-02 13:04:58 +0200
commit521eaad10b2b9b7104b2b55e66864b54577e7b54 (patch)
tree81a446304a1996baa7544adaa0ca0be721d63a72 /dgedit/volumefader.cc
parent6fa22c8eab8cbae74079a344a759fbd179ed857e (diff)
Fixed peak reporting. Use fabs() not abs() when working with double!
Diffstat (limited to 'dgedit/volumefader.cc')
-rw-r--r--dgedit/volumefader.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/dgedit/volumefader.cc b/dgedit/volumefader.cc
index 33b1f57..08bab80 100644
--- a/dgedit/volumefader.cc
+++ b/dgedit/volumefader.cc
@@ -61,13 +61,14 @@ VolumeFader::~VolumeFader()
}
-void VolumeFader::updatePeakDb(double)
+void VolumeFader::updatePeakDb(double db)
{
+// updatePeakPower(pow(10, db/20));
}
void VolumeFader::updatePeakPower(double newpeak)
{
- peak = (newpeak * (1-P) + peak * P);
+ peak = (newpeak * (1.0-P) + peak * P);
volumepeak->setText("Peak " + QString::number(peak, 'f', 5));
handleValueChanged();
}