/** * 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); } }