Example #1
0
 protected float GetParameterValue(string parameter)
 {
     if (_parameters.ContainsKey(parameter))
     {
         DSPParameter dSPParameter = _parameters[parameter];
         return(dSPParameter.GetValue());
     }
     return(0f);
 }
		public override void UpdateParameters()
		{
			if (!_FrontLeftChannel.HasReachedTarget() || !_FrontRightChannel.HasReachedTarget() || !_CenterChannel.HasReachedTarget() || !_RearLeftChannel.HasReachedTarget() || !_RearRightChannel.HasReachedTarget() || !_LFEChannel.HasReachedTarget())
			{
				FabricTimer.Get();
				if (_samplePlayerComponent != null)
				{
					_samplePlayerComponent._channelGains[0] = _FrontLeftChannel.GetValue();
					_samplePlayerComponent._channelGains[1] = _FrontRightChannel.GetValue();
					_samplePlayerComponent._channelGains[2] = _CenterChannel.GetValue();
					_samplePlayerComponent._channelGains[3] = _LFEChannel.GetValue();
					_samplePlayerComponent._channelGains[4] = _RearLeftChannel.GetValue();
					_samplePlayerComponent._channelGains[5] = _RearRightChannel.GetValue();
				}
				base.UpdateParameters();
			}
		}
 public override void UpdateParameters()
 {
     if (_distortionLevel.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioDistortionFilter audioDistortionFilter = _dspInstances[i] as AudioDistortionFilter;
         if ((bool)audioDistortionFilter)
         {
             audioDistortionFilter.distortionLevel = _distortionLevel.GetValue();
         }
     }
     base.UpdateParameters();
 }
Example #4
0
 public override void UpdateParameters()
 {
     if (_cutoffFrequency.HasReachedTarget() && _lowpassResonaceQ.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioLowPassFilter audioLowPassFilter = _dspInstances[i] as AudioLowPassFilter;
         if ((bool)audioLowPassFilter)
         {
             audioLowPassFilter.cutoffFrequency   = _cutoffFrequency.GetValue();
             audioLowPassFilter.lowpassResonanceQ = _lowpassResonaceQ.GetValue();
         }
     }
     base.UpdateParameters();
 }
Example #5
0
 public override void UpdateParameters()
 {
     if (_delay.HasReachedTarget() && _decayRatio.HasReachedTarget() && _wetMix.HasReachedTarget() && _dryMix.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioEchoFilter audioEchoFilter = _dspInstances[i] as AudioEchoFilter;
         if ((bool)audioEchoFilter)
         {
             audioEchoFilter.delay      = _delay.GetValue();
             audioEchoFilter.decayRatio = _decayRatio.GetValue();
             audioEchoFilter.wetMix     = _wetMix.GetValue();
             audioEchoFilter.dryMix     = _dryMix.GetValue();
         }
     }
     base.UpdateParameters();
 }
Example #6
0
 public override void UpdateParameters()
 {
     if (_dryLevel.HasReachedTarget() && _reverbLevel.HasReachedTarget() && _reflectionsLevel.HasReachedTarget())
     {
         return;
     }
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioReverbFilter audioReverbFilter = _dspInstances[i] as AudioReverbFilter;
         if (audioReverbFilter != null)
         {
             if (audioReverbFilter.reverbPreset != _reverbPreset)
             {
                 audioReverbFilter.reverbPreset = _reverbPreset;
             }
             audioReverbFilter.dryLevel         = _dryLevel.GetValue();
             audioReverbFilter.reflectionsLevel = _reflectionsLevel.GetValue();
             audioReverbFilter.reverbLevel      = _reverbLevel.GetValue();
         }
     }
     base.UpdateParameters();
 }
Example #7
0
 public override void UpdateParameters()
 {
     if (_dryMix.HasReachedTarget() && _wetMix1.HasReachedTarget() && _wetMix2.HasReachedTarget() && _wetMix3.HasReachedTarget() && _delay.HasReachedTarget() && _rate.HasReachedTarget() && _depth.HasReachedTarget() && _feedback.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioChorusFilter audioChorusFilter = _dspInstances[i] as AudioChorusFilter;
         if ((bool)audioChorusFilter)
         {
             audioChorusFilter.dryMix  = _dryMix.GetValue();
             audioChorusFilter.wetMix1 = _wetMix1.GetValue();
             audioChorusFilter.wetMix2 = _wetMix2.GetValue();
             audioChorusFilter.wetMix3 = _wetMix3.GetValue();
             audioChorusFilter.delay   = _delay.GetValue();
             audioChorusFilter.rate    = _rate.GetValue();
             audioChorusFilter.depth   = _depth.GetValue();
         }
     }
     base.UpdateParameters();
 }
 public override void UpdateParameters()
 {
     if (!_FrontLeftChannel.HasReachedTarget() && !_FrontRightChannel.HasReachedTarget() && !_CenterChannel.HasReachedTarget() && !_SideLeftChannel.HasReachedTarget() && !_SideRightChannel.HasReachedTarget() && !_RearLeftChannel.HasReachedTarget() && !_RearRightChannel.HasReachedTarget() && !_LFEChannel.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioPanner audioPanner = _dspInstances[i] as AudioPanner;
         if ((bool)audioPanner)
         {
             audioPanner._channelGains[0] = _FrontLeftChannel.GetValue();
             audioPanner._channelGains[1] = _FrontRightChannel.GetValue();
             audioPanner._channelGains[2] = _CenterChannel.GetValue();
             audioPanner._channelGains[3] = _LFEChannel.GetValue();
             audioPanner._channelGains[4] = _RearLeftChannel.GetValue();
             audioPanner._channelGains[5] = _RearRightChannel.GetValue();
             audioPanner._channelGains[6] = _SideLeftChannel.GetValue();
             audioPanner._channelGains[7] = _SideRightChannel.GetValue();
         }
     }
     base.UpdateParameters();
 }