Example #1
0
  @Override
  public void buildGraph() {

    ((Sound) node)
        .setSchedulingBoundingLeaf(
            (BoundingLeaf) control.getSymbolTable().getJ3dNode(boundingLeaf));
    ((Sound) node)
        .setSoundData((MediaContainer) control.getSymbolTable().getJ3dNode(mediaContainer));
    super.buildGraph(); // Must be last call in method
  }
Example #2
0
  @Override
  public void readObject(DataInput in) throws IOException {
    super.readObject(in);

    Sound sound = (Sound) node;

    sound.setContinuousEnable(in.readBoolean());
    sound.setEnable(in.readBoolean());
    sound.setInitialGain(in.readFloat());
    sound.setLoop(in.readInt());
    sound.setPriority(in.readFloat());
    sound.setReleaseEnable(in.readBoolean());
    boundingLeaf = in.readInt();
    sound.setSchedulingBounds(control.readBounds(in));
    mediaContainer = in.readInt();
    sound.setMute(in.readBoolean());
    sound.setPause(in.readBoolean());
    sound.setRateScaleFactor(in.readFloat());
  }
Example #3
0
  @Override
  public void writeObject(DataOutput out) throws IOException {
    super.writeObject(out);

    Sound sound = (Sound) node;

    out.writeBoolean(sound.getContinuousEnable());
    out.writeBoolean(sound.getEnable());
    out.writeFloat(sound.getInitialGain());
    out.writeInt(sound.getLoop());
    out.writeFloat(sound.getPriority());
    out.writeBoolean(sound.getReleaseEnable());
    out.writeInt(boundingLeaf);
    control.writeBounds(out, sound.getSchedulingBounds());
    out.writeInt(mediaContainer);
    out.writeBoolean(sound.getMute());
    out.writeBoolean(sound.getPause());
    out.writeFloat(sound.getRateScaleFactor());
  }