From 0e54ba2dc6f3c548e954669df94f57d46a34a84c Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 22 Sep 2014 21:07:28 -0700 Subject: Make replay gain optional --- src/github/daneren2005/dsub/service/DownloadService.java | 2 +- src/github/daneren2005/dsub/util/Constants.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 1e32bd2a..9c2e2ce5 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1940,7 +1940,7 @@ public class DownloadService extends Service { try { float[] rg = BastpUtil.getReplayGainValues(downloadFile.getFile().getCanonicalPath()); /* track, album */ float adjust = 0f; - if (Util.getPreferences(this).getBoolean(Constants.PREFERENCES_KEY_REPLAY_GAIN, true)) { + if (Util.getPreferences(this).getBoolean(Constants.PREFERENCES_KEY_REPLAY_GAIN, false)) { // If playing a single album or no track gain, use album gain if((singleAlbum || rg[0] == 0) && rg[1] != 0) { adjust = rg[1]; diff --git a/src/github/daneren2005/dsub/util/Constants.java b/src/github/daneren2005/dsub/util/Constants.java index a61102fe..88dfa086 100644 --- a/src/github/daneren2005/dsub/util/Constants.java +++ b/src/github/daneren2005/dsub/util/Constants.java @@ -144,6 +144,7 @@ public final class Constants { public static final String PREFERENCES_KEY_SERVER_SYNC = "serverSync"; public static final String PREFERENCES_KEY_RECENT_COUNT = "mostRecentCount"; public static final String PREFERENCES_KEY_MENU_RATING = "showRating"; + public static final String PREFERENCES_KEY_REPLAY_GAIN = "replayGain"; public static final String OFFLINE_SCROBBLE_COUNT = "scrobbleCount"; public static final String OFFLINE_SCROBBLE_ID = "scrobbleID"; -- cgit v1.2.3