Exemple #1
0
    public override void Update()
    {
        // handle routing
        if (routingType == RoutingType.None)
        {
            return;
        }

        float newVal = 0;

        switch (routingType)
        {
        case RoutingType.AudioBypass:
            newVal = RoutingServer.SampleBypass();
            break;

        case RoutingType.AudioHigh:
            newVal = RoutingServer.SampleTreble();
            break;

        case RoutingType.AudioLow:
            newVal = RoutingServer.SampleBass();
            break;

        case RoutingType.Oscillator:
            newVal = RoutingServer.SampleOscillator(oscillatorType, oscillatorFrequency);
            break;
        }
        newVal = Mathf.Pow(newVal, power);
        newVal = Mathf.Lerp(uiMin, uiMax, newVal);
        newVal = min + newVal * (max - min);

        if (newVal > value)
        {
            value = newVal;
        }
        else
        {
            value = Mathf.Lerp(value, newVal, lerp);
        }
    }
Exemple #2
0
 public void SetUp()
 {
     _host = RoutingServer.Start <TestServer>(GetUri());
 }