public void AudioDataBeforeRunningTest() { inputAudio = new float[4096]; for (var index = 0; index < inputAudio.Length; index++) { inputAudio[index] = (float)System.Math.Sin( 2 * System.Math.PI * index / (512 / 5.2)); } _audioData = new AudioDataMono((float[])inputAudio.Clone()); // damages samples for (var index = 1051; index < 1059; index++) { _audioData.SetInputSample(index, -0.5f); } for (var index = 0; index < inputAudio.Length; index++) { _audioData.SetOutputSample( index, _audioData.GetInputSample(index)); } _audioClick = new AudioClick( 1051, 10, 111, _audioData, //new AudioDataMono(inputAudio), ChannelType.Left); }
public ClickWindow(AudioClick audioClick) { InitializeComponent(); _audioClickBinded = audioClick; ThresholdLevelDetected.Text = audioClick.ErrorLevelDetected.ToString("0.0"); Position.Text = audioClick.Position.ToString("0"); SetBorderColour(); SetPolylines(); }
public void AudioClickBeforeRunningTests() { var audioData = new AudioDataMono(new float[100]); _audioClickFirst = new AudioClick( 1111, 10, 3.7F, audioData, ChannelType.Left); _audioClickTheSame = _audioClickFirst; _audioClickEqual = new AudioClick( 1111, 10, 3.7F, audioData, ChannelType.Left); _audioClickSecond = new AudioClick( 2222, 10, 3.7F, audioData, ChannelType.Left); _audioClickDifferentChannel = new AudioClick( 1111, 10, 3.7F, audioData, ChannelType.Right); _audioClickDifferentLength = new AudioClick( 1111, 22, 3.7F, audioData, ChannelType.Left); _audioClickDifferentPosition = new AudioClick( 2222, 10, 3.7F, audioData, ChannelType.Left); _audioClickLargerPosition = new AudioClick( 2222, 10, 3.7F, audioData, ChannelType.Left); _audioClickLesserPosition = new AudioClick( 0001, 10, 3.7F, audioData, ChannelType.Left); }
private void Start() { _rigidbody = GetComponent <Rigidbody2D>(); _animator = GetComponent <Animator>(); _aClick = GetComponent <AudioClick>(); }