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;
|
||||
if (oldEnhancer != null) {
|
||||
newEnhancer.setEnabled(oldEnhancer.getEnabled());
|
||||
if (oldEnhancer.getEnabled()) {
|
||||
newEnhancer.setTargetGain((int) oldEnhancer.getTargetGain());
|
||||
}
|
||||
oldEnhancer.release();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue