public static void generateWave(double frequency, double volume, int length, int phase, String outputFile) throws IOException {
short[] data = generateWave(frequency, volume, length, phase);
byte[] byteData = SharedDSPFunctions.shortArrayToByteArray(data);
WaveFile w = WaveGenerator.generateWaveFromRaw16bitPcm(byteData);
w.outputToFile(outputFile);
}
public static short[] generateWave(double frequency, double volume, int length) {
return generateWave(frequency,volume,length,0);
}