Example usage for javax.media.j3d Sound ALLOW_ENABLE_READ

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

Introduction

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

Prototype

int ALLOW_ENABLE_READ

To view the source code for javax.media.j3d Sound ALLOW_ENABLE_READ.

Click Source Link

Document

Specifies that this node allows access to its object's sound on information.

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);//ww  w .jav  a2s.  c om

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

        Point2f[] gainArray = getSoundDistanceGain(bCollide);

        if (gainArray != null)
            pointSound.setDistanceGain(gainArray);
    }
}