Ejemplo n.º 1
0
        internal RoutingEntry (Source source, EffectSlot target, float gain, Filter filter = null)
        {
            this.Source = source;
            this.Target = target;

            this.Filter = filter;
            this.gain = gain.Clamp (0f, 1f);
            sourceRouteIndex = -1;

        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds an audio routing entry from the given source to the given target, where a filter can be applied optionally
 /// </summary>
 /// <returns>The audio routing entry</returns>
 /// <param name="source">Where does the signal come from?</param>
 /// <param name="target">Where should the signal go to?</param>
 /// <param name="gain">How loud should the final effect be?</param>
 /// <param name="filter">Should the signal be filtered?</param>
 public RoutingEntry AddAudioRouting(Source source, EffectSlot target, float gain, Filter filter = null)
 {
     var routing = new RoutingEntry (source, target, gain.Clamp (0f, 1f), filter);
     currentRouting.Add (routing);
     routing.Setup ();
     return routing;
 }