I am using NetBeans IDE and I get this warning when writing a simple class that can play a WAV file:
As shown in the picture the same message appears at several parts in the sourcecode. Is the Java audio API outdated? If so, what can I adjust in my code to get rid of this warning?
public class Sound{
private AudioStream sound;
public Sound(String location){
try{
InputStream file = new FileInputStream(location);
sound = new AudioStream(file);
}
catch(IOException error){
//error
}
}
public void play(){
AudioPlayer.player.start(sound);
}
}
Thanks in advance!