Exemplo n.º 1
0
    // see Hv_wind_AudioLib.Parameter for definitions
    public float GetFloatParameter(Hv_wind_AudioLib.Parameter param)
    {
        switch (param)
        {
        case Parameter.Volume: return(volume);

        case Parameter.Windspeed: return(windSpeed);

        default: return(0.0f);
        }
    }
Exemplo n.º 2
0
    public void SetFloatParameter(Hv_wind_AudioLib.Parameter param, float x)
    {
        switch (param)
        {
        case Parameter.Volume: {
            x      = Mathf.Clamp(x, 0.0f, 1.0f);
            volume = x;
            break;
        }

        case Parameter.Windspeed: {
            x         = Mathf.Clamp(x, 100.0f, 800.0f);
            windSpeed = x;
            break;
        }

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