Login or Signup

OpenAL, do I need a dll?

BlitzMax Forums/BlitzMax Programming/OpenAL, do I need a dll?

Grey Alien1+ years ago #1
OpenAL works fine on my BMax PC, but when I tested it on a WinMe PC SetAudioDriver("OpenAl") returns null. Am I supposed to have a dll in with my game? If so where can I find the dll! Thanks.

Gabriel1+ years ago #2
You need the OpenAL installer for Windows.


GfK1+ years ago #3
You actually don't need the installer. Just put the two openAL DLLs in your program folder, then call EnableOpenALAudio() and it'll all work fine.

But yeah, you can get the DLLs from the installer. :)

Grey Alien1+ years ago #4
right OK thanks. So I don't recall ever running that installer on my PC and I haven't called EnableOpenALAudio, yet it works fine...

On the other PC I definitely haven't installed it so I'll try including the dlls with the exe.

GfK1+ years ago #5
Well, you don't actually NEED to use EnableOpenALAudio, but in doing so you enable several different OpenAL audio drivers (including the software mixer which I'd highly recommend using).

Grey Alien1+ years ago #6
Why do I need the software mixer again? And what are the different OpenAL drivers? (Why can't there just be one, nice an simple! arg)

GfK1+ years ago #7
When I used the default OpenAL driver on my laptop, I couldn't get it to allocate more than six audio channels, while the same code worked fine on everybody else's PC (I posted a thread here about it).

The software mixer didn't have this limitation.

Full list of drivers available (after EnableOpenALAudio):
OpenAL Default
OpenAL Generic Software *
OpenAL Generic Hardware
FreeAudio **
FreeAudio Multimedia
FreeAudio DirectSound

* = Driver I use under Vista
** = Driver I use under all other OS's

Grey Alien1+ years ago #8
Yeah I recall the other thread now. OK good advice thanks. So all I do is call EnableOpenALAudio and then use the Generic Software one and I can use more channels without any other fancy code?

GfK1+ years ago #9
Under most circumstances you can just use the OpenAL hardware driver. But as I said, you'll likely have channel problems like I did if your end user has crappy on-board sound hardware.

The software mixer is fine, but it does come with a slight performance overhead which is why I use this driver as default on Vista only. I figure any PC that can run Vista will be fast enough to suffer the [small] performance loss.

Grey Alien1+ years ago #10
yeah I heard you say that before and I agree, so I'll do the same.

Also tried Direct sound, but hacing some problems, I'll report soon.

siread1+ years ago #11
Sorry to dig this up, but what are the two dlls I need?

I see openAL32.dll but what's the other one people are referring to?

Grey Alien1+ years ago #12

siread1+ years ago #13
Nice one, thanks. :)

Blitz BASIC Founders Fund