OpenAL - Alsa
A new implementation using Alsa



This is an implementation of OpenAL library using ALSA as the only back end. OpenAL - Alsa is only a modification of the original library OpenAL-alsa-emu10k1 made by C.J.Purnell. I've simply replaced all code relative to emu10k1 processor, with a more compatible one, so now it's should work with every sound card that supports multiple sub streams. If you have an emu10k1 you don't need Openal-alsa, you should continue to use C.J.Purnell's one, anyway if you want to test it you are welcome.
You can easly verify how many sub streams your hardware can handle with a simple command, in my case:

$ cat /proc/asound/CS46xx/pcm0p/info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CS46xx
name: CS46xx
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 31
subdevices_avail: 31

[12/02/2007]
Added Surround support:openal-alsa-0.2.0.tar.gz.
Finally i've added surround support! I've tested it only on a surround40 system but it should go also with more speakers. Version 0.1.5.1 and 0.1.5.2 are now merged, so now any user can use openal-alsa. A new configuration file has been added, look at etc for it. Here's an example:

device surround40
channels 4

If you want to use more than four speakers remember to use a correct speakers configuration, as always look at etc for some examples.
Surround users must pay attention on available subdevices: Surround40 use 2 devices, front and rear, so
subdevices_avail are halved. For CS46xx users: there is a problem on an alsa configuration file: /usr/share/alsa/cards/CS46xx.conf section CS46xx.pcm.rear.0 uses an hook, you have to remove it, for example:

CS46xx.pcm.rear.0 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
device 1
}


[04/05/2006]
Dmix version:openal-alsa-0.1.5.2.tar.gz.
This is a special version intended for users who hasn't got a soundcard that support multiple sub streams. Number of voices is fixed to 64 and now device is changed to
default. You can use it with dmix alsa plug in, here it is an .asoundrc example:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
There is a problem on closing pcm streams so actually it doesn't close them at all, may be an alsa bug? I'll investigating.
Thanks to Matthew A. Nicholson for the idea.


[08/03/2006]
Stero bugfix:openal-alsa-0.1.5.1.tar.gz.
Thanks to Antonio Soriano Hernandez for the note.


[28/01/2006]
Memory optimization. No more waste of memory on mono waves openal-alsa-0.1.5.tar.gz.
I'm working on others improvements such as a new threading model and surround support, but i'm a bit busy. Any feedback or better any benchmark should be very appreciated.


[16/11/2005]
Low volume fixed openal-alsa-0.1.4.tar.gz.

[30/07/2005]
My first relase openal-alsa-0.1.3.tar.gz.
Actually it supports only stereo playback and the alsa device is fixed to HW:0 . There is also an issue with volume that is a bit low. I'm investigating.


Dino Puller (dino.puller at gmail.com)