// see Hv_pdint1_AudioLib.Parameter for definitions public float GetFloatParameter(Hv_pdint1_AudioLib.Parameter param) { switch (param) { case Parameter.Freq: return(freq); case Parameter.Gain: return(gain); default: return(0.0f); } }
public void SetFloatParameter(Hv_pdint1_AudioLib.Parameter param, float x) { switch (param) { case Parameter.Freq: { x = Mathf.Clamp(x, 0.0f, 220.0f); freq = x; break; } case Parameter.Gain: { x = Mathf.Clamp(x, 0.0f, 1.0f); gain = x; break; } default: return; } if (IsInstantiated()) { _context.SendFloatToReceiver((uint)param, x); } }