aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/activity/SettingsActivity.java5
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java
index e40a62d2..710d7385 100644
--- a/src/github/daneren2005/dsub/activity/SettingsActivity.java
+++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java
@@ -267,6 +267,11 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
}
else if(Constants.PREFERENCES_KEY_SYNC_MOST_RECENT.equals(key)) {
SyncUtil.removeMostRecentSyncFiles(this);
+ } else if(Constants.PREFERENCES_KEY_REPLAY_GAIN.equals(key)) {
+ DownloadService downloadService = DownloadService.getInstance();
+ if(downloadService != null) {
+ downloadService.reapplyVolume();
+ }
}
scheduleBackup();
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index 702a2b2f..a67418a8 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1626,12 +1626,15 @@ public class DownloadService extends Service {
if(mediaPlayer != null && (playerState == STARTED || playerState == PAUSED || playerState == STOPPED)) {
try {
this.volume = volume;
- applyReplayGain(mediaPlayer, currentPlaying);
+ reapplyVolume();
} catch(Exception e) {
Log.w(TAG, "Failed to set volume");
}
}
}
+ public void reapplyVolume() {
+ applyReplayGain(mediaPlayer, currentPlaying);
+ }
public synchronized void swap(boolean mainList, int from, int to) {
List<DownloadFile> list = mainList ? downloadList : backgroundDownloadList;