更新一些冲突内容
This commit is contained in:
@@ -412,18 +412,18 @@ namespace Convention
|
||||
BandNegativeCheck();
|
||||
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
float[] spectrum = new float[256];
|
||||
AudioListener.GetSpectrumData(spectrum, 0, FFTWindow.Rectangular);
|
||||
for (int i = 1; i < spectrum.Length - 1; i++)
|
||||
{
|
||||
Debug.DrawLine(new Vector3(i - 1, spectrum[i] + 10, 0), new Vector3(i, spectrum[i + 1] + 10, 0), Color.red);
|
||||
Debug.DrawLine(new Vector3(i - 1, Mathf.Log(spectrum[i - 1]) + 10, 2), new Vector3(i, Mathf.Log(spectrum[i]) + 10, 2), Color.cyan);
|
||||
Debug.DrawLine(new Vector3(Mathf.Log(i - 1), spectrum[i - 1] - 10, 1), new Vector3(Mathf.Log(i), spectrum[i] - 10, 1), Color.green);
|
||||
Debug.DrawLine(new Vector3(Mathf.Log(i - 1), Mathf.Log(spectrum[i - 1]), 3), new Vector3(Mathf.Log(i), Mathf.Log(spectrum[i]), 3), Color.blue);
|
||||
}
|
||||
}
|
||||
//void Update()
|
||||
//{
|
||||
// float[] spectrum = new float[256];
|
||||
// AudioListener.GetSpectrumData(spectrum, 0, FFTWindow.Rectangular);
|
||||
// for (int i = 1; i < spectrum.Length - 1; i++)
|
||||
// {
|
||||
// Debug.DrawLine(new Vector3(i - 1, spectrum[i] + 10, 0), new Vector3(i, spectrum[i + 1] + 10, 0), Color.red);
|
||||
// Debug.DrawLine(new Vector3(i - 1, Mathf.Log(spectrum[i - 1]) + 10, 2), new Vector3(i, Mathf.Log(spectrum[i]) + 10, 2), Color.cyan);
|
||||
// Debug.DrawLine(new Vector3(Mathf.Log(i - 1), spectrum[i - 1] - 10, 1), new Vector3(Mathf.Log(i), spectrum[i] - 10, 1), Color.green);
|
||||
// Debug.DrawLine(new Vector3(Mathf.Log(i - 1), Mathf.Log(spectrum[i - 1]), 3), new Vector3(Mathf.Log(i), Mathf.Log(spectrum[i]), 3), Color.blue);
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user