2019-10-05 09:38:46 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace cylvester
|
|
|
|
{
|
|
|
|
public class WaveformTexture : MonoBehaviour
|
|
|
|
{
|
2019-10-05 14:49:30 +00:00
|
|
|
[SerializeField] PdBackend PdBackend = null;
|
2019-10-05 09:38:46 +00:00
|
|
|
[SerializeField, Range(1, 16)] private int channel = 1;
|
|
|
|
|
|
|
|
|
|
|
|
private Texture2D texture2D_;
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
{
|
|
|
|
texture2D_ = new Texture2D(PdConstant.FftSize, PdConstant.FftSize, TextureFormat.R16, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
texture2D_.Apply();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|