CDs, gstreamer, digital audio
11 May 2004
On a diversion, I've written a program that detects when media changes on my CD and DVD drive, and asks to start up programs associated with the new media. So, a blank CD would start k3b, and a DVD would start xine, and an audio CD would play the CD. This uses the setcd package on Debian to determine media changes.
There're slight problems with my program (bah!), but it works for a few minutes nicely enough. It uses kdialog to ask the question, and uses CDDB (with a cache) to display the artist and title. setcd -i provides about enough information to make these sorts of decisions.
For some reason KsCD doesn't want to let me enable the option to use digital audio (CDDA) on my CDROM drive; necessary as there's no connection from the CD drive to the sound card. And anyway, KsCD only will work on one drive at a time. So, having already installed gstreamer for another purpose, I installed the gstreamer-cdparanoia Debian package, and can use gst-launch cdparanoia ! artsdsink to use CDDA to play my CDs.
But, when I do this, the CD spins up much faster than when it's just playing audio, and makes quite a bit of noise. Using setcd again, I used setcd -x 1 to slow the CDROM drive to the audio CD playing speed.
I'm not sure I'm going to keep gstreamer for the CDDA - there much be a graphical CD player that uses CDDA that I can use instead to fit my desktop. Or I'll get bored and look at pyQT and pyKDE again...