OpenAL problem with Java 1.6.0_32 and higher

Started by cleo, June 23, 2012, 16:10:24

Previous topic - Next topic

cleo

Hello,

with Java 1.6.0_32 and higher, WaveData.create() (org.lwjgl.util.WaveData) returns null.

Anybody else with the same problem?

The latest OpenAL files in LWJGL 2.8.4 don't fix the problem, unfortunately.

Example:

FileInputStream fis = null;
try {
  fis = new FileInputStream( "sounds/test.wav" );
} catch ( FileNotFoundException e ) {
  return;
}
WaveData waveFile = WaveData.create( fis );
// Here, since Java 1.6.0_32, waveFile == null, any data load impossible


With Java 1.6.0_31 and lower, all worked well.

"sounds/test.wav" is a relative path. The file is found. Could it be that WaveData.create(fis) still needs the path, even though the FileInputStream has it already? If so, could it be that WaveData.create(fis) misses the relative path now due to a Java security update?

I'll try to add the BufferedInputStream stuff found at http://lwjgl.org/forum/index.php?topic=3890.0


Regards




cleo

Anybody out there with Java 1.6.0_32 or higher who does not have the above problem?

It would be nice to know if it's just me or a general bigger problem.


Thanks.

cleo

OK ...

FileInputStream fis = null;
try {
  fis = new FileInputStream( "sounds/test.wav" );
} catch ( FileNotFoundException e ) {
  return;
}
WaveData waveFile = WaveData.create( fis );
// Here, since Java 1.6.0_32, waveFile == null, any data load impossible


Changing the last line to ...

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


... fixed the problem.