On threading and communications

Basically, I need a mix of audio and video streams.
The video can be frame-by-frame (no big deal - already have operational
code). The big problem is audio.

I’m dealing with a potentially unlimited length stream of audio (think of,
say, streaming a radio through a soundcard or better a TV audio signal).

Anyways, using mutexes for locking and conditions leaves a lot to be
desired (last time I tried this - last week - it locked up without
explanation on a mutex/condition sit). Incidentally this code works
flawlessly in all kinds of loads when there’s -no- video. Or text output
only. When video output is introduced it locks.

Now I’m not too fond of the ring-buffer system but if noone has a better
suggestion? Packets of sound may be -any- length and I may end up mixing
in multiple channels. (I’d happily use mikmod/SDL-mixer/… if I knew
how to handle unlimited-length streams with those).

Suggestions? Options?

Oh, I’m working under Linux. But I’m interested in getting this working
under Windows too, preferably also with OpenGL :slight_smile: (don’t ask)

G’day, eh? :slight_smile:
- Winterlion

PS: I’ll happily post an example if anyone wants to my website. It’s a
bit big to post to the list although the locking/streaming audio code’s
not all that large.–
Trying to bring truth from beauty is Winterlion.
find at this winterlions’ page