libcdaudio is an unmaintained but portable library that provides wrapper functions to audio CD drives and CDDB and CDIndex databaseaccess. cdcd is a commandline CD player using libcdaudio's CDDB and CDIndex functions.
It's a really easy-to-use front-end to programs like cdda2wav and bladeenc intended to convert an audio CD to mp3 files. It allows to access to the online CD database (freedb) to get disk's name and songs' names.