Dancing cubes

This is true ALSA multi-threaded capturing! This my first, ALSA and POSIX thread application. Happy that it works as intended(well I hope the cubes jumped much higher but hey..they jump!). Drawing is done on one thread and the capturing is done on another. Make sure you set the recording source for ALSA to your system out. It was easy for me because ALSA is managed(to an extent) by PulseAudio(don’t worry, the application does not include anything PulseAudio). pavucontrol makes it easier to set the source to the system’s output’s monitor.

Here’s how to compile this,

g++ -I. -o dance ogl.cc alsa.cc -DdDOUBLE -lGL -lGLU -lglut -lode -lasound

Please have the ALSA development package installed.
ALSA code was ripped out from Linux Journal’s web site, thank you!

Advertisements

One thought on “Dancing cubes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s