Home Java SoundSystem error
Reply: 0

Java SoundSystem error

user970 Published in April 20, 2018, 10:43 am

I am trying to make a program that plays sound back to you. How I got the sound was I went to this link and I had it speak some words for about 9 seconds. While he was speaking, I was recording him with Audacity. It recorded him at 16-bit PCM, 48 khz and a stereo channel.

The code I use to play the sound is,

 public void playSound(String Path) {
      try {
        Clip clip = AudioSystem.getClip();
        AudioInputStream inputStream = AudioSystem.getAudioInputStream(Variables.class.getResourceAsStream("/com/project/resources/" + Path));
      } catch (Exception e) {

and the error that pops up is at this link.

I have stored the file in another package located at com.project.resources. If you have any questions about this situation, let me know.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300686 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO