diff options
author | Matej Drobnič <matej@matejdro.com> | 2023-11-09 20:26:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 20:26:43 +0100 |
commit | 4d627cc3af6571c444b4f921f60a8e4a056e93b9 (patch) | |
tree | e1e4aeab943bfa330d2c74233cdf5f913e3d8da1 /core | |
parent | 47761bf98fed387e1ce0d3783457be849c4ea120 (diff) | |
download | AntennaPod-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.java | 4 |
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(); } |