Example usage for javax.media.j3d Sound setReleaseEnable

List of usage examples for javax.media.j3d Sound setReleaseEnable

Introduction

In this page you can find the example usage for javax.media.j3d Sound setReleaseEnable.

Prototype

public void setReleaseEnable(boolean state) 

Source Link

Document

Enables or disables the release flag for the sound associated with this sound.

Usage

From source file:KeyNavigateTest.java

protected void setSoundAttributes(Sound sound, boolean bCollide) {
    sound.setCapability(Sound.ALLOW_ENABLE_WRITE);
    sound.setCapability(Sound.ALLOW_ENABLE_READ);

    sound.setSchedulingBounds(getSoundSchedulingBounds(bCollide));
    sound.setEnable(getSoundInitialEnable(bCollide));
    sound.setLoop(getSoundLoop(bCollide));
    sound.setPriority(getSoundPriority(bCollide));
    sound.setInitialGain(getSoundInitialGain(bCollide));

    sound.setContinuousEnable(getSoundContinuousEnable(bCollide));
    sound.setReleaseEnable(bCollide);

    if (sound instanceof PointSound) {
        PointSound pointSound = (PointSound) sound;
        pointSound.setInitialGain(getSoundInitialGain(bCollide));

        Point2f[] gainArray = getSoundDistanceGain(bCollide);

        if (gainArray != null)
            pointSound.setDistanceGain(gainArray);
    }/* www. ja v a  2 s.  c  o  m*/
}