LWJGL
May 22, 2012, 04:46:28 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

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



Pages: [1]
  Print  
Author Topic: AL10.AL_BUFFERS_PROCESSED broken since lwjgl2.0 ?  (Read 2317 times)
dronus
Newbie
*
Posts: 36


« on: December 23, 2009, 16:27:02 »

Hello,

I have a sound engine working well for some time, however since lwjgl2.1 its broken:

For a source with some buffers enqueued, AL10.alGetSourcei(source, AL10.AL_BUFFERS_PROCESSED) allways returns zero, tested on several Linux 32bit systems. The enqueued buffers are repeated forever.

I already downgraded from lwjgl 2.1 to 2.0 because of this. Now checked lwjgl2.2.1,  still has this problem. I can switch the bug by exchanging lwjgl.jar and the native libs.


The app can be downloaded here:
http://vis.hfbk.net/vis/release_candidates/
It extracts itself to /tmp/VisClient. When running, press the wrench symbol in the lower right and enable the checkbox "sound", press OK.  You can now drag an mp3 file to the 3d view, it should play. However it doesn't. It does again, if the lwjgl.jar and natives in /tmp/VisClient
are replaced by good'ol 2.0rc2 ones.

The bug occurs in: https://snr.freifunk.net/trac/vis/browser/VisClient/org/dronus/al/ALAudioThread.java?rev=4134 line 133 .


Any ideas? Else I will dig into lwjgl sources to hunt this down.


thanks & nice xmas

dronus

Logged
dronus
Newbie
*
Posts: 36


« Reply #1 on: December 23, 2009, 16:44:04 »

Ok, got a clue: It's libopenal.so that breaks my code over lwgjl 2.0 to 2.2.1.

By replacing just libopenal.so with the lwjgl2.0rc2 build, I can get it running with lwjgl2.2.1 again, libopenal.so still compatible...  So it seems OpenAL team should address this, but maybe I am doing something wrong and the old AL is more tolerant.
Logged
dronus
Newbie
*
Posts: 36


« Reply #2 on: December 23, 2009, 18:24:48 »

Seems I solved this. The newer OpenAL just seems to be a little bit slower on some of the GL10... calls. When playing mp3's, the buffers are ususally small, say 2048 bytes for example. So my app just missed to enqueue fast enough, and the buffer queue runs empty. When using 5 instead of 3 buffers, it works again.

Next days I'll do some profiling to find out which AL10 method is slow now. alGetSourcei() itself seems to take quite some time...
Logged
Pages: [1]
  Print  
 
Jump to:  

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