[Openal] OpenAL Problems with Pulseaudio
Chris Robinson
chris.kcat at gmail.com
Wed Feb 17 20:17:28 PST 2010
On Wednesday 17 February 2010 1:07:55 pm Brian Doe wrote:
> I hope I'm asking this in the right place. I am having issues with
> OpenAL 1.11.753 working with Pulseaudio. I am running Ubuntu 9.10
> "Karmic Koala" (2.6.31-19-generic kernel) with Pulseaudio 0.9.19 on ALSA
> 1.0.20-3. I did my testing using gmplayer with audio preferences set for
> "OpenAL".
FWIW, mplayer's OpenAL output driver is not that great. Last I saw, it
basically creates 'x' mono streams, and positions the corresponding sources to
emulate speaker placement. This works, but fails to properly get a 1:1 channel
map, and misses the LFE. It should still play, though..
> However, when I change the driver to "Pulse" and
> attempt to play something in gmplayer, gmplayer hangs. This is the same
> for any other application that uses OpenAL (for example, Second Life). I
> have observed, using Pulseaudio Manager (paman), that the application
> will create a new sink in Pulseaudio named "Playback Stream", which is
> normal; but that's as far as the application gets, as it hangs
> completely. If I kill the sink, the application becomes responsive
> again. This same application works fine if I change OpenAL's driver to
> "ALSA" from within ~/.alsoftrc.
What speaker configuration is PulseAudio's sink using, or what format is
~/.alsoftrc configured for? I ran across a bug that acted like this if using
32-bit 6+ channel output with the default period size (essentially, anything
that creates a buffer larger than 65536 bytes).
A proper fix is in Git (commit bd518ed26463bc83f975712275d7af0b69ec897d for
the curious), and hopefully it can be picked up by distros that have OpenAL
Soft 1.11, but if this is the case for you, then you can try this work
around.. in ~/.alsoftrc, decrease the periods and/or period_size settings.
Most modern machines should be able to halve it without a problem, so setting
period_size = 1024
periods = 2
or
period_size = 512
periods = 4
should get it working.
> I attempted to compile OpenAL 1.11.753 from source, but it did not
> compile with ALSA support. Again, it would not work correctly with
> Pulseaudio.
You need ALSA's development packages to build with ALSA support (the package
might be named asound2-dev, but I'm not sure). Building the Git version would
hopefully yield better results.
More information about the Openal
mailing list