public void Study(float[][] input, long samples, bool final) { for (int i = 0; i < input.Length; i++) { if (input[i].Length < samples) { throw new Exception("Invalid input data: Channel " + i + " does not have " + samples + " samples of data"); } } long totalSamples = input.Length * samples; if (totalSamples > _studyBuffer.Length) { _studyBuffer = new float[totalSamples]; } for (int i = 0; i < input.Length; i++) { Array.Copy(input[i], 0, _studyBuffer, i * samples, samples); } RubberBandNativeMethods.RubberBandStretcher_Study(_rbs, _studyBuffer, new IntPtr(samples), input.Length, final); }