Beispiel #1
0
 public Modifier(FrequencyMod[] AM, float soundS)
 {
     AmpMod = AM;
     soundSpeed = soundS;
 }
Beispiel #2
0
 public static Modifier Refr(Modifier M1, Modifier M2)
 {
     if (M1.AmpMod.Length != M2.AmpMod.Length)
         return null;
     Modifier result;
     if (M1.soundSpeed != M2.soundSpeed)
         result = new Modifier(null, M2.soundSpeed);
     else
         result = new Modifier(null, 331.2f);
     FrequencyMod[] FM = new FrequencyMod[M1.AmpMod.Length];
     for (int i = 0; i < M1.AmpMod.Length; i++)
     {
         FM[i] = new FrequencyMod((float)0.6 * M1.AmpMod[i].Amplitude * M2.AmpMod[i].Amplitude, M1.AmpMod[i].Freq);
     }
     result.AmpMod = FM;
     result.delay = M2.delay;
     return result;
 }
Beispiel #3
0
 public Modifier(float delay, FrequencyMod[] AM)
 {
     this.delay = delay;
     AmpMod = AM;
 }