Monday, November 19, 2007

Confused about sound on Linux?

I know I am... With the arrival of PulseAudio to join OSS, ALSA, GStreamer, aRts, ESOUND, NAS, Phonon etc etc it's a bit hard to see any clarity. A article clears up things a bit.

I seems to me the "standard" way for Gnome will probably be:
- Applications decode/generate audio using GStreamer
- GStreamer sends the audio to PulseAudio which performs volume control and routing
- ALSA drivers play the routed audio onto physical cards

All three projects have some overlap and do not require any of the others to work. OSS was replaced by ALSA. ESOUND was replaced by PulseAudio.

KDE is also using Phonon as a fourth layer for API stability and to allow applications an easy way to play sounds.

Sunday, November 18, 2007

OpenGL 2.0

I noticed that since upgrading to Gutsy I appear to have OpenGL 2.0 support callable from Python... Since I've never done any OpenGL 2.0 and I have the Orange Book sitting beside my I should give it a try.

After hacking the installed libraries I got the early result of the shaders in the picture which shows hemispherical lighting (not possible in OpenGL 1).

It all seems to work quite well. I was working on some cell shading but changing shaders while drawing the scene makes everything go black. I hope it's not a driver/binding issue but something I'm doing wrong (can't work it out yet though). Hopefully sometime in the future there will be fluffy chess pieces too :)

As for putting this into glChess I think this one will have to be handled very carefully. There is enough bugs from differing OpenGL setups (and broken drivers) that the code will have to be very robust. When things start working better I'll add a secret gconf key that turns on the shaders for those in the know...