-2
私は、新しいファイルに新しいサウンドを書き込む必要があるプロジェクトに取り組んでいますが、同じファイルを上書きしています。どんな助けでも大歓迎です。新しいファイルを書くWAV
public void play(int pause, String filename, String path) throws InterruptedException {
// play the words in order
for (int i = 0; i < numWords; i++) {
myWordArray[i].blockingPlay();
Thread.sleep(pause);
try {
myWordArray[i].writeToFile("C:\\Users\\Taylor\\Desktop\\JavaMedia\\thisisatest_pause.wav\\");
} catch (SoundException e){
System.out.println("Error" +e);
}
}
}
ファイル名にインデックスを含めるよう指示されました。だから私は試しました...
public void play(int pause, String filename, String path) throws InterruptedException {
// play the words in order
for (int i = 0; i < numWords; i++) {
myWordArray[i].blockingPlay();
Thread.sleep(pause);
try {
myWordArray[i].writeToFile("C:\\Users\\Taylor\\Desktop\\JavaMedia\\thisisatest_pause" + i++ ".wav\\");
} catch (SoundException e){
System.out.println("Error" +e);
}
}
}
この行はコンパイルされません。
を試してみてはコンパイルされませんが、あなたはdn'tエラーメッセージを含むことが重要であると思いますか? – John3136
不正な式の開始と ')'が予想されます – buck4life
それはあなたにも行番号を与えていました。 – John3136