public void CopyEffectSettingsToAllSnapshots(AudioMixerGroupController group, int effectIndex, AudioMixerSnapshotController snapshot, bool includeWetParam) { AudioMixerSnapshotController[] snaps = snapshots; for (int n = 0; n < snaps.Length; n++) { if (snaps[n] == snapshot) { continue; } var effect = group.effects[effectIndex]; MixerParameterDefinition[] paramDefs = MixerEffectDefinitions.GetEffectParameters(effect.effectName); float value; if (includeWetParam) { var guid = effect.GetGUIDForMixLevel(); if (snapshot.GetValue(guid, out value)) { snaps[n].SetValue(guid, value); } } foreach (var p in paramDefs) { var guid = effect.GetGUIDForParameter(p.name); if (snapshot.GetValue(guid, out value)) { snaps[n].SetValue(guid, value); } } } }
public void CopyEffectSettingsToAllSnapshots(AudioMixerGroupController group, int effectIndex, AudioMixerSnapshotController snapshot, bool includeWetParam) { AudioMixerSnapshotController[] snapshots = this.snapshots; for (int index = 0; index < snapshots.Length; ++index) { if (!((UnityEngine.Object) snapshots[index] == (UnityEngine.Object) snapshot)) { AudioMixerEffectController effect = group.effects[effectIndex]; MixerParameterDefinition[] effectParameters = MixerEffectDefinitions.GetEffectParameters(effect.effectName); float num; if (includeWetParam) { GUID guidForMixLevel = effect.GetGUIDForMixLevel(); if (snapshot.GetValue(guidForMixLevel, out num)) snapshots[index].SetValue(guidForMixLevel, num); } foreach (MixerParameterDefinition parameterDefinition in effectParameters) { GUID guidForParameter = effect.GetGUIDForParameter(parameterDefinition.name); if (snapshot.GetValue(guidForParameter, out num)) snapshots[index].SetValue(guidForParameter, num); } } } }
public void CopyEffectSettingsToAllSnapshots(AudioMixerGroupController group, int effectIndex, AudioMixerSnapshotController snapshot, bool includeWetParam) { AudioMixerSnapshotController[] snapshots = this.snapshots; for (int i = 0; i < snapshots.Length; i++) { if (!(snapshots[i] == snapshot)) { AudioMixerEffectController audioMixerEffectController = group.effects[effectIndex]; MixerParameterDefinition[] effectParameters = MixerEffectDefinitions.GetEffectParameters(audioMixerEffectController.effectName); if (includeWetParam) { GUID gUIDForMixLevel = audioMixerEffectController.GetGUIDForMixLevel(); float value; if (snapshot.GetValue(gUIDForMixLevel, out value)) { snapshots[i].SetValue(gUIDForMixLevel, value); } } MixerParameterDefinition[] array = effectParameters; for (int j = 0; j < array.Length; j++) { MixerParameterDefinition mixerParameterDefinition = array[j]; GUID gUIDForParameter = audioMixerEffectController.GetGUIDForParameter(mixerParameterDefinition.name); float value; if (snapshot.GetValue(gUIDForParameter, out value)) { snapshots[i].SetValue(gUIDForParameter, value); } } } } }