private void GetChannels(float[][] data, float[][] channels) { if (channels.Length == 0) { return; } if (channels.Length == 1) { this.GetCenter(data, channels[0]); return; } if (channels[0] != null) { PlayerData.Interpolate(data[0], channels[0]); } if (channels[1] != null) { PlayerData.Interpolate(data[1], channels[1]); } for (int i = 2; i < channels.Length; i++) { if (channels[i] != null) { Array.Clear(channels[i], 0, channels[i].Length); } } }
private void GetCenter(float[][] data, float[] output) { if (output == null) { return; } float[] center = new float[data[0].Length]; for (int i = 0; i < center.Length; i++) { center[i] = data[0][i] / 2 + data[1][i] / 2; } PlayerData.Interpolate(center, output); }