Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Commit

Permalink
Revert rgReferenceLevel change
Browse files Browse the repository at this point in the history
  • Loading branch information
CDrummond committed Aug 2, 2018
1 parent 894d059 commit d74a5d8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
drive.
14. If a dynamic playlist has rating 0..5 stars, then include all songs (even
those without an explicit rating).
15. Add non-GUI rgReferenceLevel config item to set the reference level for
ReplayGain scanning. e.g. add 'rgReferenceLevel=-16.0" to the "General"
section.

2.3.1
-----
Expand Down
4 changes: 0 additions & 4 deletions replaygain/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <QTimer>
#include <stdio.h>
#include "replaygain.h"
#include "config.h"

int main(int argc, char *argv[])
{
Expand All @@ -40,9 +39,6 @@ int main(int argc, char *argv[])
fileNames.append(QString::fromUtf8(argv[i+1]));
}

QCoreApplication::setApplicationName(PACKAGE_NAME);
QCoreApplication::setOrganizationName(ORGANIZATION_NAME);

QCoreApplication app(argc, argv);
ReplayGain *rg=new ReplayGain(fileNames);
QTimer::singleShot(0, rg, SLOT(scan()));
Expand Down
11 changes: 0 additions & 11 deletions replaygain/trackscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#ifdef FFMPEG_FOUND
#include "ffmpeginput.h"
#endif
#include <QSettings>

#define RG_REFERENCE_LEVEL -18.0

Expand All @@ -43,16 +42,6 @@ double TrackScanner::clamp(double v)

double TrackScanner::reference(double v)
{
static double rgReferenceLevel = 1.0;

if (rgReferenceLevel>0.0) {
QSettings s;
s.beginGroup("General");
rgReferenceLevel = s.contains("rgReferenceLevel") ? s.value("rgReferenceLevel").toDouble() : RG_REFERENCE_LEVEL;
if (rgReferenceLevel > 0.0 || rgReferenceLevel < -64.0) {
rgReferenceLevel = RG_REFERENCE_LEVEL;
}
}
return clamp(RG_REFERENCE_LEVEL-v);
}

Expand Down

0 comments on commit d74a5d8

Please sign in to comment.