summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMatej Drobnič <matej@matejdro.com>2023-11-09 20:26:43 +0100
committerGitHub <noreply@github.com>2023-11-09 20:26:43 +0100
commit4d627cc3af6571c444b4f921f60a8e4a056e93b9 (patch)
treee1e4aeab943bfa330d2c74233cdf5f913e3d8da1 /core
parent47761bf98fed387e1ce0d3783457be849c4ea120 (diff)
downloadAntennaPod-4d627cc3af6571c444b4f921f60a8e4a056e93b9.zip
Only set target gain when enhancer was enabled (#6751)
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/ExoPlayerWrapper.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ExoPlayerWrapper.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ExoPlayerWrapper.java
index c275444d9..79cd97fd2 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ExoPlayerWrapper.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ExoPlayerWrapper.java
@@ -358,7 +358,9 @@ public class ExoPlayerWrapper {
LoudnessEnhancer oldEnhancer = this.loudnessEnhancer;
if (oldEnhancer != null) {
newEnhancer.setEnabled(oldEnhancer.getEnabled());
- newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
+ if (oldEnhancer.getEnabled()) {
+ newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
+ }
oldEnhancer.release();
}