Use OpenAL as Audio Driver?

Archives Forums/Linux Discussion/Use OpenAL as Audio Driver?

Captain Wicker (crazy hillbilly)(Posted 2012) [#1]
Can I use OpenAL as the Linux audio driver? How do I do that?


GfK(Posted 2012) [#2]
You can, but you might find it a simpler process (and less painful) to split atoms using a large hammer and a six-inch flat-headed nail.


Captain Wicker (crazy hillbilly)(Posted 2012) [#3]
LOL!


D4NM4N(Posted 2012) [#4]
OpenAL is not a driver, it is a framework/API. It is the same as saying "i want to use OpenGL as a graphics driver"... which of course sounds ridiculous.
- you should be saying "i need openGL/AL compatible hardware + driver to -use- OGL/OAL".

Last edited 2012


ziggy(Posted 2012) [#5]
@D4ANM4AN: In BlitzMax terminology, OpenGL, DX9 and DX7 "drivers" are available, and the same for sound. OpenAL, FreeAudio, etc are considered available audio "Drivers". Taking into account how they're designed they're in fact driver drivers instead of hardware drivers, but anyway, in BlitzMax terminology I *think* it makes sense.


B(Posted 2012) [#6]
EDIT: Just realized this is in the Linux forums. Sorry!

Hey guys,

Saw this post was active and decided to post here instead of making a new thread.

I am having trouble getting audio to work on my windows computer.
It worked fine on my mac, but since that one died I bought a new windows laptop.

I have searched all over this site and google and cannot find a tutorial or anything for that matter that tells you how to get audio working in Blitz.

I have .ogg files I would like to use in my game.

Any help would be greatly appreciated!

Thanks!

B

Last edited 2012


Tachyon(Posted 2012) [#7]
I have no sound either. Just updated my Linux box to 12.04 LTS. Installed all dependencies. Apps compile just fine, but no sound at all. :-/

Help?


Captain Wicker (crazy hillbilly)(Posted 2012) [#8]
The ALSA driver makes audio work in Ubuntu 12.04 based distros.
http://www.blitzmax.com/Community/posts.php?topic=98049
Here is a zip with the two edited files necessary to use ALSA: http://dl.dropbox.com/u/56193888/pub.mod.zip
Just copy and replace.

Last edited 2012


Tachyon(Posted 2012) [#9]
Thanks, Capt'n.


Devlin(Posted 2012) [#10]
Just as a given, you should ensure that you have these packages installed:
libopenal1 libopenal-dev

Then, whack this somewhere near the beginning of your code (I put mine just after where I specify my Graphics "driver"):
SetAudioDriver("OpenAL")

And load/play audio as normal.

This works for me, but if you're still having issues with audio you may have to provide a link with your application/game that looks a bit like this:

padsp '/path/to/app/executable'


Last edited 2012


Captain Wicker (crazy hillbilly)(Posted 2012) [#11]
Thanks, Devlin.


D4NM4N(Posted 2012) [#12]
In BlitzMax terminology, OpenGL, DX9 and DX7 "drivers" are available, and the same for sound. OpenAL, FreeAudio, etc are considered available audio "Drivers".
The original post was not asking about a "compatability driver" (basically a wrapper) he was asking about "using OpenAL as the Linux audio driver". There was no mention of MAX.

^Well. it turns out that he was talking about an opanAL max "driver".

-but still OpenAL itself is not a "driver".

Last edited 2012


Captain Wicker (crazy hillbilly)(Posted 2012) [#13]
There was no mention of MAX.

Okay, allow me to rephrase the question.
Can I use OpenAL as a BlitzMax Linux audio driver?
;P

Last edited 2012


D4NM4N(Posted 2012) [#14]
yes. ;P


Captain Wicker (crazy hillbilly)(Posted 2012) [#15]
I do this:
sudo apt-get install libopenal0a libopenal-dev

and add
SetAudioDriver("OpenAlAudio")

And it refuses to work. Why isn't it working?


Captain Wicker (crazy hillbilly)(Posted 2013) [#16]
I finally got this working. I specify "OpenAlAudio" in the above post, when it should be
SetAudioDriver("OpenAL")

I reckon I deserve a great big facepalm, then LOL :D