private void updateAudio() {
        Filter newDryFilter;
        if (!useDryFilter) {
            newDryFilter = null;
        } else if (underWater) {
            newDryFilter = underWaterAudioFilter;
        } else {
            newDryFilter = aboveWaterAudioFilter;
        }
        Filter oldDryFilter = waves.getDryFilter();
        if (oldDryFilter != newDryFilter) {
            System.out.println("dry filter : " + newDryFilter);
            waves.setDryFilter(newDryFilter);
        }

        boolean newReverbEnabled = !underWater;
        boolean oldReverbEnabled = waves.isReverbEnabled();
        if (oldReverbEnabled != newReverbEnabled) {
            System.out.println("reverb enabled : " + newReverbEnabled);
            waves.setReverbEnabled(newReverbEnabled);
        }
    }
Update the audio settings (dry filter and reverb)
based on boolean fields ({@code underWater} and {@code useDryFilter}).
jme3-examples/src/main/java/jme3test/water/TestPostWater.java