Ejemplo n.º 1
0
    public void SetFloatParameter(Hv_waves_AudioLib.Parameter param, float x)
    {
        switch (param)
        {
        case Parameter.Frequency: {
            x         = Mathf.Clamp(x, 50.0f, 4000.0f);
            frequency = 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);
        }
    }
Ejemplo n.º 2
0
    public void SetFloatParameter(Hv_waves_AudioLib.Parameter param, float x)
    {
        switch (param)
        {
        case Parameter.Volume: {
            x      = Mathf.Clamp(x, 10.0f, 100.0f);
            volume = x;
            break;
        }

        case Parameter.Wavespeed: {
            x         = Mathf.Clamp(x, 10.0f, 100.0f);
            wavespeed = x;
            break;
        }

        default: return;
        }
        if (IsInstantiated())
        {
            _context.SendFloatToReceiver((uint)param, x);
        }
    }