Attached is a set of patches that adds an openal32.dll thunk, allowing an app using OpenAL to use the system's lib instead of Creative's software driver. The advantages of using the system lib include:
* It avoids the unnecessary step through DirectSound, instead going right to ALSA, OSS, or whichever is supported by the system implementation. This also allows for a DSound->OpenAL wrapper, since OpenAL won't create a circular dependency by using DSound.
* It can provide more options and features, including surround sound (where Creative's software driver only does stereo), depending on the implementation.
* It integrates better with the system, as Wine apps will use the same OpenAL configuration used by native apps.
If necessary, the Windows DLL can still be used by adding an openal32 override with installing the Windows redistributable. However, more recent versions of the Unix/Linux OpenAL have been much better compatibility-wise than the old 0.0.8 version, as it is actually a fork of the LGPL Windows version.
This patch set does not support OSX's OpenAL, but it should be simple enough to add for anyone familiar with handling frameworks in configure.ac.
An incomplete list of games that use OpenAL, for testing, can be found here: http://connect.creativelabs.com/openal/OpenAL%20Wiki/Games.aspx
Comments and questions are welcome.
I'll give it a try with my games. The old thunk from a while ago already worked very will with those games.
OpenAL seems to have an extension system like opengl. If there is a function that returns an extension string we'll want to remove any extension our thunk doesn't know about. However, I can't find any such function, but I only did a very quick search
On Tuesday 25 August 2009 6:40:30 am Stefan Dösinger wrote:
I'll give it a try with my games. The old thunk from a while ago already worked very will with those games.
OpenAL seems to have an extension system like opengl. If there is a function that returns an extension string we'll want to remove any extension our thunk doesn't know about. However, I can't find any such function, but I only did a very quick search
There are functions for both the extension string, and for checking individual extensions (eg. alcGetString(device, ALC_EXTENSIONS) / alGetString(AL_EXTENSIONS) return a GL-like list of extensions for ALC and AL respectively, and alcIsExtensionPresent(device, "foo") / alIsExtensionPresent("foo") says if extension 'foo' is supported).
However, I don't like the idea of white-listing extensions. IMO, it would be better to print a FIXME (as it currently does), and add any functions that get found. Often times it's just new enum tokens, and it would be silly to block them out because the thunk isn't aware of them.
2009/8/26 Chris Robinson chris.kcat@gmail.com:
On Tuesday 25 August 2009 6:40:30 am Stefan Dösinger wrote:
I'll give it a try with my games. The old thunk from a while ago already worked very will with those games.
OpenAL seems to have an extension system like opengl. If there is a function that returns an extension string we'll want to remove any extension our thunk doesn't know about. However, I can't find any such function, but I only did a very quick search
There are functions for both the extension string, and for checking individual extensions (eg. alcGetString(device, ALC_EXTENSIONS) / alGetString(AL_EXTENSIONS) return a GL-like list of extensions for ALC and AL respectively, and alcIsExtensionPresent(device, "foo") / alIsExtensionPresent("foo") says if extension 'foo' is supported).
However, I don't like the idea of white-listing extensions. IMO, it would be better to print a FIXME (as it currently does), and add any functions that get found. Often times it's just new enum tokens, and it would be silly to block them out because the thunk isn't aware of them.
From a technical point of view it shouldn't be too hard to generate
thunks for the extensions at runtime. Convincing anyone that it's a good idea might be harder though.
Chris Robinson wrote:
Attached is a set of patches that adds an openal32.dll thunk, allowing an app using OpenAL to use the system's lib instead of Creative's software driver. The advantages of using the system lib include:
Strange, doesn't compile here: ccache gcc -m32 -m32 -c -I../../../wine.git/dlls/openal32 -I. -I../../../wine.git/include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wtype-limits -Wpointer-arith -g -O2 -o openal.o ../../../wine.git/dlls/openal32/openal.c ../../../wine.git/dlls/openal32/openal.c:40: error: expected specifier-qualifier-list before ‘ALCcontext’ ../../../wine.git/dlls/openal32/openal.c:110: error: expected ‘)’ before ‘*’ token
I've got latest openal-soft git, compiled and installed. Distro itself had old (158) version.
Vitaliy.
Vitaliy Margolen wrote:
Chris Robinson wrote:
Attached is a set of patches that adds an openal32.dll thunk, allowing an app using OpenAL to use the system's lib instead of Creative's software driver. The advantages of using the system lib include:
Strange, doesn't compile here:
Never mind, haven't re-generated all files after configure changes. Will test with few of my programs later on today and report back.
Vitaliy.
Vitaliy Margolen wrote:
Vitaliy Margolen wrote:
Chris Robinson wrote:
Attached is a set of patches that adds an openal32.dll thunk, allowing an app using OpenAL to use the system's lib instead of Creative's software driver. The advantages of using the system lib include:
Strange, doesn't compile here:
Never mind, haven't re-generated all files after configure changes. Will test with few of my programs later on today and report back.
Tested few games that had issues with native OpenAL from Creative (both windows dll and thunked old Linux version): STALKER SoC, STALKER CS, Psychonauts. So far so good! Great job.
Thanks Chris, greatly appreciate your work on OpenAL!
Vitaliy
On Wednesday 26 August 2009 9:27:42 pm Vitaliy Margolen wrote:
Tested few games that had issues with native OpenAL from Creative (both windows dll and thunked old Linux version): STALKER SoC, STALKER CS, Psychonauts. So far so good! Great job.
Thanks Chris, greatly appreciate your work on OpenAL!
Cool. I'll probably send it to wine-patches soon, after hearing back from Stefan and making sure no problems crop up.
Am Thursday 27 August 2009 07:14:49 schrieb Chris Robinson:
On Wednesday 26 August 2009 9:27:42 pm Vitaliy Margolen wrote:
Tested few games that had issues with native OpenAL from Creative (both windows dll and thunked old Linux version): STALKER SoC, STALKER CS, Psychonauts. So far so good! Great job.
Thanks Chris, greatly appreciate your work on OpenAL!
Cool. I'll probably send it to wine-patches soon, after hearing back from Stefan and making sure no problems crop up.
I didn't have a chance to test any games yet - I am away from home, visiting some old school friends.
I might have a chance tomorrow, if I am not flooded by cxgames issues. The only two games I could test are trackmania and jedi academy.
Hi,
On Aug 25, 2009, at 8:15 AM, Chris Robinson wrote:
This patch set does not support OSX's OpenAL, but it should be simple enough to add for anyone familiar with handling frameworks in configure.ac.
I'm attaching a patch to do so. It's a bit hacky since we don't really have a way to check frameworks, but it's in line with the existing hacks for Mac frameworks.
Thanks, Chris, for putting this together!
Cheers, Ken