[Openal] Re: OpenAL Soft performance question
Chris Robinson
chris.kcat at gmail.com
Wed Oct 7 02:20:41 PDT 2009
On Tuesday 06 October 2009 10:56:56 am Troy Yee wrote:
> I have an application using OpenAL Soft 1.8.466 + commits to 2009-07-03.
> Things work fine at startup but after some long period of time (5 +
> hours), audio playback practically stops - a request to play a source
> takes several seconds before any change in sound is observed and then
> things are *very* choppy - same buffers seem to get replayed even. The
> application is running on SuSE Linux Enterprise 10.1 with ALSA backend.
> The issue could be related to the application but there has been some
> evidence to suggest that it may be a problem with OpenAL.
Does it always happen after the same length of time, or is it just more likely
to happen the longer playback runs? OpenAL itself shouldn't have any issues
with prolonged playback, barring obscure bugs. It doesn't keep a counter for
total play length, or explicitly track time, or anything.. it just processes
however many samples the audio backend says to, when it says to. If there's a
problem with the lib the backend uses, that can cause issues, though.
When using ALSA, you can try disabling mmap by adding this to ~/.alsoftrc:
[alsa]
mmap = off
That should make it update the sound card in a manner similar to the OSS
backend. If that fixes it, then ALSA may have problems using mmap for long
periods of time. If it doesn't, there may be a problem deeper in ALSA.
PulseAudio's plugin for ALSA in particular has issues with mmap, if you have
that installed.
> I've noticed some ALSA related changes in the GIT repository. Could any of
> the findings that resulted in those changes explain the observed
> behaviour? (Perhaps even the recent change regarding the thread stop
> condition?)
No, that was a fix for a bug that crept in from a commit just after 1.9's
release, so that it would properly stop playback when the context was being
destroyed.
More information about the Openal
mailing list