コード例 #1
0
            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;
            }
コード例 #2
0
		/// <summary>
		/// Creates a new controller.
		/// </summary>
		public SDLController() {
			NullPlayerData data = new NullPlayerData();
			
			this.mPlayerData = data;
			this.mBeatDetector = data;
		}