private float GetBass(PlayerData data) { float[] freq = new float[data.NativeSpectrumLength]; data.GetSpectrum(freq); float sum = 0; int range = freq.Length / 100; for (int i = 0; i < range; i++) sum += freq[i]; return sum / range; }
/// <summary> /// Creates a new controller. /// </summary> public SDLController() { NullPlayerData data = new NullPlayerData(); this.mPlayerData = data; this.mBeatDetector = data; }