Burning MP3s onto an audio CD
In order to burn MP3s as an audio CD, you first have to convert the MP3's to .wav format. The mpg123 tool (part of the mpg321 package) is able to do this.
The following script may be used to burn all MP3s in the current directory as an audio CD. The script first converts all spaces in MP3 filenames to underscores. The MP3s are then decoded into .wav files. Finally, cdrecord burns the .wav files to disc. The script assumes a CD recorder device path of 0,0,0 and a 48x burn rate. For more information, see the Linux MP3 CD Burning mini-HOWTO.
# Convert files containing spaces to underscores
for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done
# Convert MP3s to WAV files
for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done
# Burn the CD
cdrecord dev=0,0,0 -eject speed=48 -pad -audio *.wav