LWJGL
May 25, 2013, 03:03:02 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: WaveData.create returns null  (Read 1123 times)
222464
Newbie
*
Posts: 7


« on: March 04, 2012, 19:13:35 »

Hello,

I am having great difficulties getting a sound to load. I initialized OpenAL, and then I attempted to load them like this:

Code:
FileInputStream fin;

try
{
fin = new FileInputStream("data/sounds/blam.wav");
}
catch(FileNotFoundException e)
{
System.out.println("Error trying to load sound data/sounds/blam.wav: Could load the sound file!");
e.printStackTrace();
return false;
}

    WaveData waveFile = WaveData.create(new BufferedInputStream(fin));

It finds the file, but WaveData.create always returns null.

What am I doing wrong here?
Logged
222464
Newbie
*
Posts: 7


« Reply #1 on: March 09, 2012, 18:53:07 »

Never mind, I figured it out. For some reason, re-exporting the WAVE file made it work.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!