lundi 29 décembre 2014

Error with sound related code


InputStream in;
try{
in = new FileInputStream(new File ("C:\\Users\\Sony\\Desktop\\all_shook_up.wav"));
AudioStream audios = new AudioStream(in);
AudioPlayer.player.start(audios);
}
catch(Exception e){
System.out.println("Wrong.");
}


Whenever I run this program, the output seems to be "Wrong." I have no idea as to what I have done wrong.


Aucun commentaire:

Enregistrer un commentaire