OpenAL builds fine, but applications using it crash. This even happens
with the openal-info.exe binary that is automatically built, and with
the test-openal.exe binary.
I just tried test-openal.exe using wine and got this:
err:ntdll:RtlpWaitForCriticalSection section 0x434048 "?" wait timed out
in thread 0009, blocked by 0000, retrying (60 sec)
Thanks for confirming that this is not just a problem on my system.
I found the problem. OpenAL has initialization and deinitialization
functions alc_init() and alc_deinit(), defined in Alc/ALc.c. On Windows,
these are called via automatic execution of DllMain by default. In our
case, we have to use the gcc constructor/destructor attributes instead,
like non-Windows platforms do.
The attached patch makes this change by augmenting the
openal-1-fixes.patch file.
Both openal-info.exe and test-openal.exe now work for me.
Martin