[linux-audio-dev] OpenGL + Audio = Bad Idea?

Richard Spindler richard.spindler at gmail.com
Sat May 21 16:00:17 UTC 2005


I have a little Problem:

I'm using OpenGL in my Program, in combination with OSS via portaudio.
The Updates of the OpenGL display are triggered by the audio callback,
protected using the available Methods of the GUI-Toolkit that I use

And I'm experiencing very strange effects, like: without Audio the
OpenGL works fine. without the OpenGL, the audio works fine, however
when used in combination, the Audio Thread (callback) stops very soon,
and I have no Idea why?

I used efence to discover wheater I'm screwing up memory somewhere,
but I couldn't find anything. I ran valgrind, but it couldn't find
something helpful either.

I ran it from within gdb, but the program behaves correctly if run
from gdb (heisenbug?). It even works better whenever I insert some
cout's for debugging purposes.

in gdb it also reports a signal like this when initializing the
openGL, but I believe that might be propably unreleated.


BTW. I'm running an unmodified ubuntu warty.

Any tips or pointers??


PS.: (writing this message led me to some more experiments ;) )
I'm fairly sure that something is screwed up within thread
syncronisation, because I can "fix" it by inserting a usleep() call at
a certain position, but I do have a fairly hard time imagining what
could be wrong. I'm considering to switch to blocking IO for Audio
because, latency and stuff is not really an issue.

More information about the Linux-audio-dev mailing list