瀏覽代碼

LowPassFilter: add no-args constructor

Wyatt Gillette 4 月之前
父節點
當前提交
4ae2e550aa
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      jme3-core/src/main/java/com/jme3/audio/LowPassFilter.java

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

@@ -49,13 +49,21 @@ public class LowPassFilter extends Filter {
     /**
     /**
      * The overall volume scaling of the filtered sound
      * The overall volume scaling of the filtered sound
      */
      */
-    protected float volume;
+    protected float volume = 1.0f;
     /**
     /**
      * The volume scaling of the high frequencies allowed to pass through. Valid values range
      * The volume scaling of the high frequencies allowed to pass through. Valid values range
      * from 0.0 to 1.0, where 0.0 completely eliminates high frequencies and 1.0 lets them pass
      * from 0.0 to 1.0, where 0.0 completely eliminates high frequencies and 1.0 lets them pass
      * through unchanged.
      * through unchanged.
      */
      */
-    protected float highFreqVolume;
+    protected float highFreqVolume = 1.0f;
+
+    /**
+     * Constructs a low-pass filter with default settings.
+     * Required for jME deserialization.
+     */
+    public LowPassFilter() {
+        super();
+    }
 
 
     /**
     /**
      * Constructs a low-pass filter.
      * Constructs a low-pass filter.