summaryrefslogtreecommitdiff
path: root/GameCode/MusicVisualizerData.cs
blob: 078940eb7eb3de7efe5ec66e295fb80575125858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using UnityEngine;

public class MusicVisualizerData : MonoBehaviour
{
	public static float[] Samples = new float[512];

	private AudioSource m_audioSource;

	private void Awake()
	{
		m_audioSource = GetComponent<AudioSource>();
	}

	private void Update()
	{
		m_audioSource.GetSpectrumData(Samples, 0, FFTWindow.Blackman);
	}
}