GetFloatBuffer() публичный абстрактный Метод

public abstract GetFloatBuffer ( string name, float &data, int numsamples ) : bool
name string
data float
numsamples int
Результат bool
Пример #1
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = plugin.IsPluginEditableAndEnabled() ? 1.0f : 0.5f;

            float threshold, ratio, makeupGain, attackTime, releaseTime, knee;

            plugin.GetFloatParameter(kThresholdName, out threshold);
            plugin.GetFloatParameter(kRatioName, out ratio);
            plugin.GetFloatParameter(kMakeupGainName, out makeupGain);
            plugin.GetFloatParameter(kAttackTimeName, out attackTime);
            plugin.GetFloatParameter(kReleaseTimeName, out releaseTime);
            plugin.GetFloatParameter(kKneeName, out knee);

            float[] metering; plugin.GetFloatBuffer("Metering", out metering, 2);

            GUILayout.Space(5f);
            Rect r = GUILayoutUtility.GetRect(200, 160, GUILayout.ExpandWidth(true));

            if (CurveDisplay(plugin, r, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, metering[0], metering[1], blend))
            {
                plugin.SetFloatParameter(kThresholdName, threshold);
                plugin.SetFloatParameter(kRatioName, ratio);
                plugin.SetFloatParameter(kMakeupGainName, makeupGain);
                plugin.SetFloatParameter(kAttackTimeName, attackTime);
                plugin.SetFloatParameter(kReleaseTimeName, releaseTime);
                plugin.SetFloatParameter(kKneeName, knee);
            }

            return(true);
        }
Пример #2
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
            float value;

            plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out value);
            float value2;

            plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out value2);
            float value3;

            plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out value3);
            float value4;

            plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out value4);
            float value5;

            plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out value5);
            float value6;

            plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out value6);
            float[] array;
            plugin.GetFloatBuffer("Metering", out array, 2);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true)
            });

            if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref value, ref value2, ref value3, ref value4, ref value5, ref value6, array[0], array[1], blend))
            {
                plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, value);
                plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, value2);
                plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, value3);
                plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, value4);
                plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, value5);
                plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, value6);
            }
            return(true);
        }
Пример #3
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
            float threshold;

            plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out threshold);
            float ratio;

            plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out ratio);
            float makeupGain;

            plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out makeupGain);
            float attackTime;

            plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out attackTime);
            float releaseTime;

            plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out releaseTime);
            float knee;

            plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out knee);
            float[] data;
            plugin.GetFloatBuffer("Metering", out data, 2);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[1]
            {
                GUILayout.ExpandWidth(true)
            });

            if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, data[0], data[1], blend))
            {
                plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, threshold);
                plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, ratio);
                plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, makeupGain);
                plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, attackTime);
                plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, releaseTime);
                plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, knee);
            }
            return(true);
        }
Пример #4
0
 public override bool OnGUI(IAudioEffectPlugin plugin)
 {
   float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
   float threshold;
   plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out threshold);
   float ratio;
   plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out ratio);
   float makeupGain;
   plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out makeupGain);
   float attackTime;
   plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out attackTime);
   float releaseTime;
   plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out releaseTime);
   float knee;
   plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out knee);
   float[] data;
   plugin.GetFloatBuffer("Metering", out data, 2);
   GUILayout.Space(5f);
   Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[1]
   {
     GUILayout.ExpandWidth(true)
   });
   if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, data[0], data[1], blend))
   {
     plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, threshold);
     plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, ratio);
     plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, makeupGain);
     plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, attackTime);
     plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, releaseTime);
     plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, knee);
   }
   return true;
 }
Пример #5
0
		public override bool OnGUI(IAudioEffectPlugin plugin)
		{
			float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
			float value;
			plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out value);
			float value2;
			plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out value2);
			float value3;
			plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out value3);
			float value4;
			plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out value4);
			float value5;
			plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out value5);
			float value6;
			plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out value6);
			float[] array;
			plugin.GetFloatBuffer("Metering", out array, 2);
			GUILayout.Space(5f);
			Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[]
			{
				GUILayout.ExpandWidth(true)
			});
			if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref value, ref value2, ref value3, ref value4, ref value5, ref value6, array[0], array[1], blend))
			{
				plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, value);
				plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, value2);
				plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, value3);
				plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, value4);
				plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, value5);
				plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, value6);
			}
			return true;
		}