I am on the verge of a writing a program to read a list of tracks from an audio CD in C but since i also program Ruby i am playing around with it using an already existing library. This is how to set it up on a debian machine.
% apt-get install libcdio
% apt-get install libcdio-dev
% apt-get install libcdio-cdda-dev
% apt-get install iso9660-dev
% gem install rbcdio
% apt-get install libcddb-dev
irb(main):001:0> require ‘rubygems’
irb(main):002:0> require ‘cdio’
And that is that.