/** * This clearLive routine first calls the superclass's method, then * it removes itself to the list of lights */ @Override void clearLive(SetLiveState s) { super.clearLive(s); if (s.switchTargets != null && s.switchTargets[0] != null) { s.switchTargets[0].addNode(this, Targets.SND_TARGETS); } if (attributes != null) { attributes.clearLive(s.refCount); } if (s.transformTargets != null && s.transformTargets[0] != null) { s.transformTargets[0].addNode(this, Targets.SND_TARGETS); s.notifyThreads |= J3dThread.UPDATE_TRANSFORM; } // If its view Scoped, then add this list // to be sent to Sound Structure if ((s.viewScopedNodeList != null) && (s.viewLists != null)) { s.viewScopedNodeList.add(this); s.scopedNodesViewList.add(s.viewLists.get(0)); } else { s.nodeList.add(this); } s.notifyThreads |= (J3dThread.UPDATE_SOUND | J3dThread.SOUND_SCHEDULER); }
/** * Set a set of aural attributes for this Soundscape * @param attributes aural attributes to be set */ void setAuralAttributes(AuralAttributes attributes) { if (this.source.isLive()) { if (this.attributes != null) { this.attributes.clearLive(refCount); } if (attributes != null) { ((AuralAttributesRetained)attributes.retained).setLive(inBackgroundGroup, refCount); } } if (this.attributes != null) { this.attributes.removeUser(this); } if (attributes != null) { this.attributes = (AuralAttributesRetained)attributes.retained; this.attributes.addUser(this); } else { this.attributes = null; } // copy all fields out of attributes and put into our copy of attributes this.isDirty |= ATTRIBUTES_CHANGED; dispatchMessage(ATTRIBUTES_CHANGED, attributes); if (source != null && source.isLive()) { notifySceneGraphChanged(false); } }