LWJGL Forum

Programming => OpenAL => Topic started by: 222464 on March 05, 2012, 03:13:35

Title: WaveData.create returns null
Post by: 222464 on March 05, 2012, 03: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:

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?
Title: Re: WaveData.create returns null
Post by: 222464 on March 10, 2012, 02:53:07
Never mind, I figured it out. For some reason, re-exporting the WAVE file made it work.
Title: Re: WaveData.create returns null
Post by: jmguillemette on November 02, 2013, 22:22:24
i think we may be in the same boat.. what do you mean you re-exported?