for (int i = 0; i < nSamples; i++) {
data[c][i] = (double)samples[i];
}
}
CrackDetector detector = new CrackDetector(wave.sampleRate(), nSamples);
Turbine t = new Turbine();
double probingFreq = Double.parseDouble(args[1]);
detector.processAudio(t.blade(0), data[0], probingFreq);
detector.processAudio(t.blade(1), data[1], probingFreq);
if (detector.detect(t.blade(0), t.blade(1))) {
System.out.println("Crack detected");
} else {
System.out.println("No cracks");
}
}