Thread View: pl.comp.lang.java
1 messages
1 total messages
Started by kblaszke
Sat, 20 Aug 2011 10:47
could not get audio input stream from input file
Author: kblaszke
Date: Sat, 20 Aug 2011 10:47
Date: Sat, 20 Aug 2011 10:47
31 lines
2042 bytes
2042 bytes
Mam taki kawałek kodu (przepisany żywcem z jakiegoś tutoriala):
File audioFile = new File("beep1.wav");
if(!audioFile.exists()){
System.err.println("Nie ma pliku beep1.wav");
}
try {
AudioInputStream stream =
AudioSystem.getAudioInputStream(audioFile);
} catch (UnsupportedAudioFileException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
No i właśnie w momencie AudioInputStream stream =
AudioSystem.getAudioInputStream(audioFile); wyrzuca mi wyjÄ…tek
javax.sound.sampled.UnsupportedAudioFileException: could not get audio
input stream from input file
at
javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:
1187)
at SampledAudio.main(NazwaKlasy.java:24)
Macie pomysł czemu _on_ mi to robi? ;-)
Pozdrawiam
Krzysiek
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads