public void setMaxDistance(float maxDistance) {
        if (maxDistance < 0) {
            throw new IllegalArgumentException("Max distance cannot be negative");
        }

        this.maxDistance = maxDistance;
        if (channel >= 0)
            getRenderer().updateSourceParam(this, AudioParam.MaxDistance);
    }
Set the maximum distance for the attenuation of the audio node.
Does nothing if the audio node is not positional.
<br>
The maximum distance is the distance beyond which the audio
node will no longer be attenuated.  Normal attenuation is logarithmic
from refDistance (it reduces by half when the distance doubles).
Max distance sets where this fall-off stops and the sound will never
get any quieter than at that distance.  If you want a sound to fall-off
very quickly then set ref distance very short and leave this distance
very long.

@param maxDistance The maximum playing distance.
@throws IllegalArgumentException If maxDistance is negative
jme3-core/src/main/java/com/jme3/audio/AudioNode.java