Use error.printStackTrace() instead of just printing "file not found".
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Code works for me. I changed the .wav reference to a local file:
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
BGM = new AudioStream(new FileInputStream("Audio/mysound.wav"));
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Sorry, I don't know anything about your IDE.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
> i have a bunch of warning signs on a bunch of my lines in the program. is it possibly because of my settings in eclipse?
Well, reading them seems to be a good place to start?
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
I don't use an IDE. I have an enhanced editor with syntax highlighting and commmandlines I can set. Compiles can take < 1 second.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Eclipse is obviously not happy that you are directly accessing sun classes. Those are just warnings though and won't prevent you from using them.
Did you change your catch block to print the stack trace of the IOException?
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
Have you tried a different wav file?
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
I wouldn't think so. Perhaps it was just an incompatible file or it was corrupted.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847