summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--playback/service/src/main/java/de/danoeh/antennapod/playback/service/internal/ExoPlayerWrapper.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/playback/service/src/main/java/de/danoeh/antennapod/playback/service/internal/ExoPlayerWrapper.java b/playback/service/src/main/java/de/danoeh/antennapod/playback/service/internal/ExoPlayerWrapper.java
index 9816c2231..bdeca417a 100644
--- a/playback/service/src/main/java/de/danoeh/antennapod/playback/service/internal/ExoPlayerWrapper.java
+++ b/playback/service/src/main/java/de/danoeh/antennapod/playback/service/internal/ExoPlayerWrapper.java
@@ -399,11 +399,15 @@ public class ExoPlayerWrapper {
LoudnessEnhancer newEnhancer = new LoudnessEnhancer(audioStreamId);
LoudnessEnhancer oldEnhancer = this.loudnessEnhancer;
if (oldEnhancer != null) {
- newEnhancer.setEnabled(oldEnhancer.getEnabled());
- if (oldEnhancer.getEnabled()) {
- newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
+ try {
+ newEnhancer.setEnabled(oldEnhancer.getEnabled());
+ if (oldEnhancer.getEnabled()) {
+ newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
+ }
+ oldEnhancer.release();
+ } catch (Exception e) {
+ Log.d(TAG, e.toString());
}
- oldEnhancer.release();
}
this.loudnessEnhancer = newEnhancer;