LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: o0Julia0o on June 14, 2012, 17:14:18

Title: [FIXED]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 14, 2012, 17:14:18
hi :)

the OpenAL32.dll makes the sound be overdriven ;-(

in further versions i hadn´t this problem. If i use a old version from the OpenAL32.dll it sounds normal.

OS: Windows XP SP3 32bit
Soundblaster: Creative Soundblaster X-Fi Driver-Version: 6.0.1.1348 from 07.07.2010

Julia :)

Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: CodeBunny on June 14, 2012, 17:27:19
This isn't Minecraft tech support, you know. If there's a problem with the Minecraft utilization of LWJGL, it's on their end, so bring it up with Jeb et al.
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: Elviz on June 15, 2012, 09:00:33
I see (hear) this in my LWJGL-based application, too. No fancy code involved, I'm also able to reproduce it with org.lwjgl.test.openal.PlayTest. Wave output sounds loud and distorted when AL_GAIN is non-zero.

This is on a 32-bit Windows XP system with LWJGL 2.8.4. The problem wasn't present in (the OpenAL libraries packaged with) 2.8.3 and earlier.

A different Windows machine I tested my game on didn't exhibit the sound distortion, so I thought some aspect of my age-old sound card (SoundBlaster Live Value) or its drivers might be to blame here. Then again, I never really had any trouble with it before.
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: princec on June 15, 2012, 12:52:03
What happens if you delete the OpenAL32.dll that comes with LWJGL and try again?

Cas :)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: Elviz on June 15, 2012, 14:05:31
Quote from: princec on June 15, 2012, 12:52:03
What happens if you delete the OpenAL32.dll that comes with LWJGL and try again?

Then I'll get an LWJGLException ("Could not locate OpenAL library") and the resulting UnsatisfiedLinkErrors.

But here's what may be a clue. This is the output produced by the constructor of org.lwjgl.test.openal.BasicTest when PlayTest is run using the OK-sounding 2.8.3:
Default device: DirectSound Default
Available devices:
0: DirectSound Default


...whereas 2.8.4 prints this:
Default device: OpenAL Soft
Available devices:
0: OpenAL Soft


Edit: Or perhaps that's just a naming issue, and the real problem is elsewhere. The OpenAL Soft commit log for 1.14 (http://repo.or.cz/w/openal-soft.git/shortlog/refs/tags/openal-soft-1.14) contains a number of commits related to device names.
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: kappa on June 15, 2012, 14:42:59
what if you use an OpenAL32.dll from a previous version of LWJGL? does the sound still get 'overdriven'?
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: o0Julia0o on June 15, 2012, 15:35:44
If i use an OpenAL32.dll from previous versions(i only can test 32bit) the sound sounds well.

Quote from: Elviz on June 15, 2012, 09:00:33
so I thought some aspect of my age-old sound card (SoundBlaster Live Value) or its drivers might be to blame here. Then again, I never really had any trouble with it before.
I am using a Creative Soundblaster X-Fi Driver-Version: 6.0.1.1348 from 07.07.2010
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: kappa on June 15, 2012, 17:10:30
If using an older version of OpenAL32.dll with the new version of LWJGL fixes the issue then the problem is likely with the OpenAL-Soft library and should be reported to them. LWJGL is using a pretty new version of OpenAL-Soft (1.14) so likely if they fix the issue we'll pick it up in the next release. For now you can just use an older version of OpenAL-Soft (OpenAL32.dll) if it fixes the issue for you.

EDIT: G to A :)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: Matzon on June 15, 2012, 19:22:07
Surely you mean OpenAL32.dll - and not OpenGL ;)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: kappa on June 15, 2012, 19:31:31
Quote from: Matzon on June 15, 2012, 19:22:07
Surely you mean OpenAL32.dll - and not OpenGL ;)
Doh :)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: o0Julia0o on June 15, 2012, 21:15:58
Quote from: kappa on June 15, 2012, 17:10:30
If using an older version of OpenAL32.dll with the new version of LWJGL fixes the issue then the problem is likely with the OpenAL-Soft library and should be reported to them.
thx, so to them. Who is them?

Julia :)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: kappa on June 15, 2012, 21:19:15
Quote from: o0Julia0o on June 15, 2012, 21:15:58
Quote from: kappa on June 15, 2012, 17:10:30
If using an older version of OpenAL32.dll with the new version of LWJGL fixes the issue then the problem is likely with the OpenAL-Soft library and should be reported to them.
thx, so to them. Who is them?

Julia :)
OpenAL-Soft (http://kcat.strangesoft.net/openal.html)
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: o0Julia0o on June 15, 2012, 21:23:53
thx, no contact-email. Only a irc-channel. But nobody answeres.
Title: Re: Minecraft 1.25 vs. LWJGL 2.8.4
Post by: Mickelukas on June 16, 2012, 16:07:05
Quote from: o0Julia0o on June 15, 2012, 21:23:53
thx, no contact-email. Only a irc-channel. But nobody answeres.

There is a contact email on that website...
http://opensource.creative.com/mailman/listinfo/openal (http://opensource.creative.com/mailman/listinfo/openal)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 16, 2012, 16:27:43
oh, i only saw the mailinglist before - thx Mickelukas :)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 08:05:18
Try a recent nighly: http://www.newdawnsoftware.com/jenkins/view/OpenAL/
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 17, 2012, 08:18:28
thx - the same problem with the #1196 build.
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 08:38:38
from IRC:
Quote<KittyCat> hmm...
<KittyCat> the only change I can think of that would have an effect is that openal soft defaults to trying 32-bit float output instead of 16-bit int
<KittyCat> she mentions she's using XP with a real soundblaster card, so it's quite possible that directsound is giving her a real 32-bit float hardware buffer
<KittyCat> same with Elviz further down
<KittyCat> perhaps the hardware is not properly clamping float values to the -1..+1 range, causing overflow and distortion. though if that were the case, low AL_GAIN values that avoid loud output should work fine
<KittyCat> or maybe the drivers are setting a 32-bit int mode even though I'm specifically setting 32-bit float
<Mazon> is there an option to select 16 bit int ?
<KittyCat> using alsoft.ini, yeah. %AppData%\alsoft.ini, and specify:
<KittyCat> [general]
<KittyCat> sample-type = int16
<KittyCat> might be better for me to just disallow floats with dsound, though
<KittyCat> or only use it if specifically requested
<KittyCat> could also try doing  sample-type = int32  to see if the float32-accepted-as-int32 theory is right
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Elviz on June 17, 2012, 09:24:14
sample-type = int16 and sample-type = int32 both work. No distortion.

sample-type = float32, on the other hand, results in the same distorted sound as having no alsoft.ini at all.
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 17, 2012, 09:58:43
"%AppData%\alsoft.ini" doesn´t find anything. I i search for alsoft.ini on my computer, i found nothing.
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 12:01:57
Quote from: o0Julia0o on June 17, 2012, 09:58:43
"%AppData%\alsoft.ini" doesn´t find anything. I i search for alsoft.ini on my computer, i found nothing.
just create it :)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 12:19:24
also, try updating soundblaster drivers!
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 12:22:32
Build #1197+ of openal (http://www.newdawnsoftware.com/jenkins/view/OpenAL/job/OpenAL-win32/lastSuccessfulBuild/) will stop requesting 32bit buffers ... so try that build
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 17, 2012, 18:29:02
Thx. The drivers are up to date.  With Build #1197 it works. So - all o.k. for the future :) Thx! And what about OpenAL64.dll -> There´s only a #1193 Build: http://www.newdawnsoftware.com/jenkins/view/OpenAL/job/OpenAL-win64
Is the problem there fixed, too?
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 20:48:22
that has already been build - so should be fine.
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 20:55:14
pushed latest openal to nightly lwjgl builds too
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: o0Julia0o on June 17, 2012, 21:51:23
Ah thx, Matzon! Does the openal32.dll for 64bit name: openAL64.dll -> http://www.newdawnsoftware.com/jenkins/view/OpenAL/job/OpenAL-win64/1193  ???

Julia :)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: Matzon on June 17, 2012, 22:42:16
yeah - a bit confusing ... we rename it internally to OpenAL64.dll  ::)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: princec on June 18, 2012, 07:38:48
Talking of which I still have to rename OpenAL32.dll to OpenALSoft32.dll to avoid random f*ckups in the wild.

Cas :)
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: kappa on June 19, 2012, 10:53:50
Quote from: princec on June 18, 2012, 07:38:48
Talking of which I still have to rename OpenAL32.dll to OpenALSoft32.dll to avoid random f*ckups in the wild.

Cas :)
Why not just use "-Dorg.lwjgl.librarypath" instead of "-Djava.library.path"? should pretty much avoid any problems like the above.
Title: Re: [BUG]Minecraft 1.25 vs. LWJGL 2.8.4(OpenAL32.dll)
Post by: princec on June 19, 2012, 13:31:14
I'm not sure it worked properly. Further testing required.

Cas :)