请你帮我从下面的代码中调用构造函数Spectogram()
if (ae.getActionCommand().equals("play")) {
try {
ai = AudioSystem.getAudioInputStream(file);
c.close();
c = AudioSystem.getClip();
c.open(ai);
c.start();
// As you imagine these types do not match.
// How can I convert this line to make it workable??
Spectogram sp = new Spectogram(ai);
} catch (Exception e) {
e.printStackTrace();
}
}
这是我想要调用的构造函数,用于创建谱图并将其嵌入我的Wave播放器
public Spectogram(Wave wave) {
this.wave=wave;
buildSpectrogram();
}