LWJGL
May 22, 2013, 15:13:08 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: OpenAL problem with Java 1.6.0_32 and higher  (Read 1364 times)
cleo
Newbie
*
Posts: 5


« on: June 23, 2012, 09:10:24 »

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:

Code:
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

 

Logged
cleo
Newbie
*
Posts: 5


« Reply #1 on: June 25, 2012, 00:33:14 »

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.
Logged
cleo
Newbie
*
Posts: 5


« Reply #2 on: June 28, 2012, 19:27:46 »

OK ...

Code:
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 ...

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

... fixed the problem.
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!