Decision Time: OpenAL or DirectSound

BlitzMax Forums/BlitzMax Programming/Decision Time: OpenAL or DirectSound

Grey Alien(Posted 2007) [#1]
I'd like to ressurect this thread in which you can test out FreeAudio, OpenAL and DirectSound:

http://www.blitzbasic.com/Community/posts.php?topic=73716

I have to decide which driver to use for non-XP systems in the next couple of days (OpenAL or DirectSound). I'm planning on using FreeAudio for XP, but some people have reported lags with it, so maybe I should swap to one of the others for XP too?

OpenAL requires a small .dll to be distributed with it, but it sounds nicer than DirectSound which is RAW. I did recall someone once saying OpenAL didn't work on their Vista install but I can't find that post again and noone else has reported it (but I don't like to ignore info like that).

This single decision could cost me THOUSANDS of dollars in lost sales if the wrong driver is chosen and people get issues with sound and thus don't buy the game...but hey, I need to think positive ;-)


JoshK(Posted 2007) [#2]
Direct Sound is no longer supported. OpenAL is the standard.


N(Posted 2007) [#3]
What he said.


Dreamora(Posted 2007) [#4]
The only ones with OpenAL problems on Vista were users of Creative. Their drivers had similar issues to AMDs but current drivers should have solved that.

Onboard never had problems with it.


Grey Alien(Posted 2007) [#5]
But I heard DirectSound was emulated or something on Vista? It seems to work fine anyway, or are you saying it may stop working in the future?

Hmm, Creative is a common brand of card though right (I've got one)? And most users never update drivers. Well I guess on-board sound is the most common now...


N(Posted 2007) [#6]
But I heard DirectSound was emulated or something on Vista?
Poorly.
are you saying it may stop working in the future?
This is possible, given that it's not going to be supported anymore.


FlameDuck(Posted 2007) [#7]
It seems to work fine anyway, or are you saying it may stop working in the future?
Yes. That's generally what happens with unsupported software.


REDi(Posted 2007) [#8]
OpenAL requires a small .dll to be distributed with it


Grey, AFAIK, you shouldn't distribute the dll at all, your supposed to use a "dynamic link" to the dll that gets installed to system32. also there is more than one version of the dll, 32bit and 64bit (both called OpenAL32.dll) the openal installer will make sure the correct version is available.

I think you are allowed to distribute a *changed* version of the dll with your app, if you also supply the source code(under LGPL)

IMHO its best to distribute the openal installer instead, maybe have an option in your games installer to launch it.
(see the OpenAL SDK for a copy of the redist installer)

just my opinion mate, doesnt mean its correct! LOL ;)


Dreamora(Posted 2007) [#9]
Correct, Creative is common if you have a dedicated soundcard. But does not make a difference, the X-Fi were seriously broken for 4+ month post Vista launch and some users still didn't realize that they must update their drivers and enable that damned auto update of Windows or should better leave the windows world for the good of the net security.


Grey Alien(Posted 2007) [#10]
REDi: Hmm that's a SERIOUS bummer if true because I looked into OpeanAL a while ago and didn't realise that the licence was that restrictive. I was distributing the DLL, because of course you can't guarantee that it is installed on anyone's system.

Distributing the OpenAL installer would probably prove totally impractical unfortunately. I'm not sure what Big Fish Games would think about that. Naturally, we can't release the source code of the game under LGPL, either.

This could be a real bugbear and mean that I will have to swap to Direct Sound after having previously decided on OpenAL as my main sound driver. So, I wonder if it means that I cannot distribute the OpenAL DLL with my framework examples like AOTMG then?...

oh, let's say I was able to distribute the DLL do you really think it matters if I run a 32-bit DLL on a 64-bit OS?


REDi(Posted 2007) [#11]
This might be one solution... apparently you can launch the openal installer in silent mode, no one need know :)

sorry mate dont have a 64bit system to check with, dont know if its a serious difference or not, might just be a performance thing?


REDi(Posted 2007) [#12]
quote from http://www.openal.org/windows_enumeration.html

3) A very conservative approach...

a) Install a version of OpenAL under any name in any location you want.
b) Dynamically link with your implementation of OpenAL.
c) Optionally allow the user to tell the app (through an INI file or the interface) to use a system-wide implementation of OpenAL elsewhere.
d) Before loading the user's selection, make sure that the selected device supports your application's required spec revision and/or required extensions.



going by that you can distribute the dll.


popcade(Posted 2007) [#13]
Torque Game Engine distributes the OpenAL DLLs with their package, however the 32bit DLLs are not guaranteed to work under 64bit system due to the emulated nature.

Vista has a coming SP1 which fixes a few issues like Creative Sound Card. And anything prior to DX9 was actually deprecated for a while, in Vista they're emulated (DX1 - 9), only DX10 is the only native, more info can be find on MSDN.


REDi(Posted 2007) [#14]
just found out there is a newer SDK on creatives site than the one i had, and it now comes with a deployment doc...


Developers are advised to employ the standard policy for OpenAL deployment – the OpenAL Re-distributable package. This installer will ensure that the most up-to-date versions of the OpenAL libraries, including OpenAL32.dll are present in the windows system folder, no matter which Windows version is running.
It is possible to just place a copy of OpenAL32.dll and other OpenAL components in the same directory as your application’s main executable. However, doing this will mean that without your own intervention, your application cannot benefit from improved versions of OpenAL components released subsequently.




Creative OpenAL re-distributable
The Creative OpenAL re-distributable will ensure that the latest Creative OpenAL router, Generic Software and Generic Hardware renderers and are present on the user’s system.
The re-distributable ensures that newer components are never overwritten, and is designed to work with all current 32-bit and 64-bit versions of Windows XP and Windows Vista. Creative’s testing teams work hard to make sure that new versions of the OpenAL implementations maintain compatibility with legacy OpenAL titles. This means that if a user has multiple OpenAL games installed, they can all share one set of OpenAL libraries. And installing an OpenAL title featuring the re-distributable should never result in a previously installed game breaking.
You can download the re-distributable package from the Creative Labs Developer Relations website (http://developer.creative.com, Games -> Dev Kits and Tools -> OpenAL -> OpenAL Installer for Windows). As its name suggests, you can freely ship this package with your game. Read carefully the license agreement which is displayed when you invoke the installer – note that it is possible to run the installer silently with the command line parameter –s.



so yes, you can now actually distribute the dll, but is it a good idea?

they have also changed the license so that your not allowed to tinker with the source any more :(

BTW they updated openal in "summer 2007" just in case anyone hasnt got it yet.


Grey Alien(Posted 2007) [#15]
Aha, I thought I read something like that. Phew, scare over. I get how it may not be wise to keep the dll in the game folder instead of running the redist, but that's what I'm gonna do :-)


REDi(Posted 2007) [#16]
fair do's mate :)