Browse Source

LowPassFilter: correct default values for read/write fields

Wyatt Gillette 4 months ago
parent
commit
3eebd56efd
1 changed files with 4 additions and 4 deletions
  1. 4 4
      jme3-core/src/main/java/com/jme3/audio/LowPassFilter.java

+ 4 - 4
jme3-core/src/main/java/com/jme3/audio/LowPassFilter.java

@@ -136,16 +136,16 @@ public class LowPassFilter extends Filter {
     public void write(JmeExporter ex) throws IOException {
         super.write(ex);
         OutputCapsule oc = ex.getCapsule(this);
-        oc.write(volume, "volume", 0);
-        oc.write(highFreqVolume, "hf_volume", 0);
+        oc.write(volume, "volume", 1f);
+        oc.write(highFreqVolume, "hf_volume", 1f);
     }
 
     @Override
     public void read(JmeImporter im) throws IOException {
         super.read(im);
         InputCapsule ic = im.getCapsule(this);
-        volume = ic.readFloat("volume", 0);
-        highFreqVolume = ic.readFloat("hf_volume", 0);
+        volume = ic.readFloat("volume", 1f);
+        highFreqVolume = ic.readFloat("hf_volume", 1f);
     }
 
     /**