WaveData.create returns null

Started by 222464, March 05, 2012, 03:13:35

Previous topic - Next topic

222464

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?

222464

Never mind, I figured it out. For some reason, re-exporting the WAVE file made it work.

jmguillemette

i think we may be in the same boat.. what do you mean you re-exported?