If your music is in mp3/ogg format, you’ll need to convert the files to PCM format first.
For mp3 files use one of the following two commands to convert song.mp3 to song.mp3.wav:
# lame --decode song.mp3 song.wav # mpg123 -s song.mp3 | sox -t .raw -r 44100 -sw -c 2 - song.wav
And for ogg:
# ogg123 -d wav song.ogg -f song.wav
If necessary, convert your wav files to 16bit stereo, 44.1kHz with
# sox song.wav -r 44100 song.new.wav resample
Audio CDs can be written in TAO (track-at-once) or DAO/SAO (disk-at-once/session-at-once) mode. TAO mode introduces 2 second gaps between the tracks, whereas DAO/SAO does not.
To test-burn your wav files using DAO/SAO mode run (replace /dev/hdX with your CD-burner’s device node)
# cdrecord dev=/dev/hdX fs=4096k -v -useinfo -dao -pad -audio -dummy song1.wav song2.wav song3.wav [...]
If everything goes well, re-run the command withouth the -dummy argument to write your audio CD.
For TAO mode use:
# cdrecord dev=/dev/hdX -v -pad -audio -dummy song1.wav song2.wav song3.wav [...]
Remove the -dummy argument and re-run the command to burn the CD.
Links: