Only set target gain when enhancer was enabled (#6751)
This commit is contained in:
parent
47761bf98f
commit
4d627cc3af
|
@ -358,7 +358,9 @@ public class ExoPlayerWrapper {
|
||||||
LoudnessEnhancer oldEnhancer = this.loudnessEnhancer;
|
LoudnessEnhancer oldEnhancer = this.loudnessEnhancer;
|
||||||
if (oldEnhancer != null) {
|
if (oldEnhancer != null) {
|
||||||
newEnhancer.setEnabled(oldEnhancer.getEnabled());
|
newEnhancer.setEnabled(oldEnhancer.getEnabled());
|
||||||
newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
|
if (oldEnhancer.getEnabled()) {
|
||||||
|
newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
|
||||||
|
}
|
||||||
oldEnhancer.release();
|
oldEnhancer.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue