private void DrawSideChain(SideChain sideChain, float length) { GUILayout.BeginVertical("box"); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label("SideChain"); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); float db = AudioTools.LinearToDB(1f - sideChain._sideChainGain); AudioTools.DBToNormalizedDB(db); GUILayout.BeginVertical("box"); GUILayout.Label("Gain:" + db.ToString("N0") + " dB"); GUILayout.EndVertical(); GUILayout.EndVertical(); }
private void DrawComponent(Component component, ref float x, float y) { if (component.ToString().Contains("GroupComponent")) { GroupComponent groupComponent = (GroupComponent)component; if (!_soloComponents.Contains(groupComponent)) { _soloComponents.Add(groupComponent); } component.ToString().LastIndexOf("."); string text = component.name; int num = text.Length * 10; float num2 = slotHeight; if (num < 120) { num = 120; } VolumeMeter component2 = groupComponent.GetComponent <VolumeMeter>(); if ((bool)component2) { num2 += 120f; } SideChain component3 = groupComponent.GetComponent <SideChain>(); if ((bool)component3) { num2 += 120f; } GUILayout.BeginArea(new Rect(x, y, num, GetActualSize(num2)), text, GUI.skin.window); MixerSlot(text, groupComponent); if ((bool)component2) { DrawVolumeMeters(component2, GetActualSize(num - 10)); } if ((bool)component3) { DrawSideChain(component3, GetActualSize(num - 30)); } GUILayout.EndArea(); x += num + 20; } }
public void SetupParameterNames(Component component) { if (_parameters == null) { return; } for (int i = 0; i < _parameters.Length; i++) { RTPParameterToProperty rTPParameterToProperty = _parameters[i]; bool flag = false; string[] array = rTPParameterToProperty._property._name.Split('/'); if (array.Length == 1) { switch (rTPParameterToProperty._property._property) { case 0: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 1: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 2: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 3: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 4: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 5: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 6: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; case 7: rTPParameterToProperty._property._componentName = "Component"; flag = true; break; } } if (!flag) { for (int j = 0; j < component._dspComponents.Length; j++) { DSPComponent dSPComponent = component._dspComponents[j]; if (!(array[0] == dSPComponent.GetTypeByName())) { continue; } for (int k = 0; k < dSPComponent.GetNumberOfParameters(); k++) { if (array[1] == dSPComponent.GetParameterNameByIndex(k)) { rTPParameterToProperty._property._componentName = dSPComponent.GetTypeByName(); rTPParameterToProperty._property._propertyName = array[1]; flag = true; break; } } } } if (flag || component._sideChainComponents == null) { continue; } for (int l = 0; l < component._sideChainComponents.Length; l++) { SideChain sideChain = component._sideChainComponents[l]; if ((bool)sideChain && array[0] == "SideChain") { rTPParameterToProperty._property._componentName = "SideChain"; flag = true; } } } }