OpenAL - no distance attenuation on Vista?

Started by
28 comments, last by BS-er 15 years, 5 months ago
hmm.. well something happened! But it's not pretty :p


I downloaded the 463MB SDK from here, and installed it:

http://www.freewarefiles.com/downloads_counter.php?programid=14055

I then deleted everything.. went back into CMake 2.6, and repeated the entire process again.

I don't know if this means anything do you but I used these (default) Cache Values:

ALSA: ON
CMAKE_BACKWARDS_COMPATIBILITY: 2.4
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_INSTALL_PREFIX: C:/Program Files/OpenAL
DLLOPEN: ON
DSOUND: ON
EXAMPLES: ON

OSS: ON
WERROR: OFF
WINMM: ON


Anyway.. it created an openal32.dll of size 83kb! Which means something happened, no doubt because of the directX install.

HOWEVER... things are now worse. On this computer (XP, with the directX SDK installed), I was able to run my game with sound, using the new openal32.dll. The problem is.. I now have the exact same original problem happening on this computer - there is no distance attenuation!

And even worse.. when I copied my exe, alut.dll, and the new openal32.dll across to my newer computer with Vista on it.. the program didn't even run!

I got an error saying:
"The application failed to initialize properly (0xc0150002)"


I then tried to run the openal-info.exe on my Vista computer.. and that didn't work either.. I got:
"The application has failed because it's side-by-side configuration is incorrect."

Which from memory has something to do with dependancies or something..

oh how confusing.

Btw, openal-info.exe seems to work fine on this computer now.



--------------------------Check out my free, top-down multiplayer shooter: Subvein
Advertisement
Those errors which you got on Vista computer probably is because there is no C runtime library installed (msvcr.. dll file).

Quote:Original post by bencelotWill installing this affect the openal32.dll build? Or will it be required to run my game?

Yes, and yes. But DirectSound is included in Windows by default, at lest starting with Windows XP.

If you want for OpenAL32.dll file to not depend on shared C runtime library, then you can build it with static C runtime library. Change Runtime Libary option in Visual Studio when you are building OpenAL. It can be found in Project -> Properties -> C/C++ -> Runtime Library. Set it to "Multi-threaded". With this option OpenAL will not depened on msvcr..dll file.
Yes that's right.. Multi-threaded did the trick. It now runs on the vista computer, as does openal-info.exe.

So progress has been made.. I'm now using openal soft, without wrap_oal.dll on both computers.

The problem now.. is that BOTH computers have no distance attenuation.. whereas originally it was only the Vista computer. But because we're using openal soft.. this can't be a hardware issue, right?

Would I be required to change any of the actual code? Perhaps the default distance attenuation model of openal soft is different from normal openal?

On both computers, openal-info.exe displays the same thing. Here are a few that might be relevant?

Default device: DirectSound Software
ALC version: 1.1
OpenAL extensions:
AL_EXT_EXPONENT_DISTANCE, AL_EXT_FLOAT32, AL_EXT_IMA4, AL_EXT_LINEAR_DISTANCE, AL_EXT_MCFORMATS, AL_EXT_OFFSET, AL_LOKI_quadriphonic


It seems that AL_EXT_EXPONENT_DISTANCE and AL_EXT_LINEAR_DISTANCE are extensions? Perhaps I have to call one of them differently to how I was previously.. I'll experiment a bit.


Btw, just a few questions about dependencies:

1) You say that Direct Sound is required to run the game.. and that it's on all windows computers (or at least XP). And yet I had to download and install a 400+MB DirectX SDK. So this means that the dll's are on all windows computers.. but the headers aren't? So to compile the program I need DirectX SDK.. but to run the program, all I need is the default dlls?

2) When it comes time to port the game to linux and mac, openal soft will simply ignore directX and use whatever those operating systems use, right? Does this mean I'll eventually have to download other header files for the other operating systems and recompile again?

Thx,
Ben.
--------------------------Check out my free, top-down multiplayer shooter: Subvein
1) yes, DXSDK is needed only for compiling OpenAL Soft.
2) for linux - yes you will need to recompile it. DSound will not be used. As for MacOSX, I already told previously - it has good OpenAL implementation from Apple itself. So no need for OpenAL Soft there. Just use default headers and libs on macosx.
Ahh ok, that's good to know.

And any ideas about why the distance attenuation no longer works? Is it something to do with extensions?

Again, thanks a lot.

Ben.
--------------------------Check out my free, top-down multiplayer shooter: Subvein
Did you try it with CreativeALchemy running?

I think its a workaround for hardware accelration/features including EAX and multi-speaker systems on Vista.

creative alchemy link

Quote:
The removal of the vendor extension mechanism from windows vistas DirectSound implementation will compromise audio in certain legacy game titles that use EAX or DirectSound3D, usually resulting in stereo output without any effects.

Creative ALchemy is a powerfull tool that resotres the audio for DirectSound3D games on vista to its former glory - in full surround sound with hardware accelerated audio mixing, sampling rate conversion and EAX effects.


note i think this only applies to DirectSound3D in vista. disregard if not relevant.
I recommend switching to fmod. I was using openal and was getting irritated at issues like the ones you are talking about. fmod is by the the best 3rd party sound library you can use.
Black Sky A Star Control 2/Elite like game
yeah, so I've heard.. but it costs money and/or has licensing issues. I don't really have the budget :p.

OpenAL is actually pretty good for my purposes.. it does exactly what I need it to do, except for this one problem. And when I solve it.. I won't have to worry about sound anymore! mwhahwhahaahahahaha

Well... until I try porting it to linux and macosx..
--------------------------Check out my free, top-down multiplayer shooter: Subvein
non-commerical is free.

hobbyist indie is $100 bucks, you would have to acquire the license before you would actually sell your game.



Black Sky A Star Control 2/Elite like game
I seem to have proper distance attenuation on Vista. I do know that stereo sound files are not attenuated (or aren't supposed to be). Could it be something as simple as that?
Value of good ideas: 10 cents per dozen.Implementation of the good ideas: Priceless.Machines, Anarchy and Destruction - A 3D action sim with a hint of strategy

This topic is closed to new replies.

Advertisement