[Openal] OpenAL Soft doesn't work on old computers?

Chris Robinson chris.kcat at gmail.com
Thu Oct 16 07:34:43 PDT 2008


On Thursday 16 October 2008 06:56:13 am bencelot wrote:
>  int main() {
>  ALCdevice* al_device = alcOpenDevice(NULL);
>  ALCcontext* al_context = alcCreateContext(sounds.al_device, NULL);
>  alcMakeContextCurrent(sounds.al_context);
>
>  int error = alGetError();

Just to note, alGetError() will always be AL_NO_ERROR on a fresh context. The 
only reason it's returning an error is because a context isn't set 
(sounds.al_context is NULL), and alGetError itself generates an 
AL_INVALID_OPERATION error without a context. You should use 
alcGetError(al_device), or check for a NULL return, to see if the alc* 
functions failed.

> How could that be? It works fine on the other 2 computers. I'm
> including alut.dll and openal32.dll right alongside the exe. I thought
> that if I included these two dll's alongside the exe, that it'll
> ensure that openal works on all computers. Is it because openal32.dll
> still depends on something external that my crap computer doesn't
> have? If so.. is there anyway I can build that into the openal32.dll
> to ensure that it works on all computers? In Visual C++, I've already
> built it using the Runtime Library setting of Multithreaded (/MT).
> What more can I do?

Were the other computers using the same DLL? If not, did OpenAL Soft build 
with DirectSound support? That's a common cause for alcOpenDevice failing 
because it has no other playback backends to use on Windows. VC in particular 
likes to fail here because the SDK doesn't install the headers and libs into 
a place where the compiler can see them by default. There's usually some 
batch file or something that can set the environment vars fot that, I think, 
but I don't know it off hand.

OpenAL Soft should work fine with DSound 7 (latest Win95 could use) and 
possibly even earlier versions as long as it uses the same API. It does need 
working DSound for playback, though. If you're sure it's built with 
DirectSound support, you'd need to trace in Alc/dsound.c in 
DSoundOpenPlayback to see what's failing.

Also, what Windows version are you using on the P3? OpenAL Soft 1.5 has a bug 
which causes it to fail on Win9x, but the latest GIT/SVN version has that 
fixed (if you don't want to get the GIT/SVN version, you can just apply this 
patch in the mean time: 
http://repo.or.cz/w/openal-soft.git?a=commitdiff;h=c1cf9ae8f6afdea81f1adc84cde628062ff6c6d9;hp=f1414c650ed209f9ac0a21949a95f4617b6842ce )


More information about the Openal mailing list