go home
UserOptions JumpSearch HelpPage
LiLAQ?: improving Linux Audio Quality

This section needs cleaning up, editing, re-organizing. If you feel like it, go ahead.

Recording Audio CDs

A good source of information on how to do this is the !CD-Writing HOWTO from the Linux Documentation Project.

"Ripping" and Playing Audio

You may notice that playing audio CDs? doesn't sound as good on your PC CD-ROM drive as on a high-quality CD player, even if you use the same amp, speakers, etc. The reason is simple: Most soundcards only have an analog input for CD audio. This means that the digital data from the CD is converted to analog by the CD drive's DAC, then runs through a tiny, cheap wire inside your computer case (a great place to send analog signals...), to your soundcard, where one of two things happen. Either the signal runs through your soundcard's analog mixer (which probably sucks) and is sent directly to the output jack, or if you're REALLY unlucky (for instance the SoundBlasterLive does this), the analog signal actually gets converted back to digital by the soundcard, then goes through the card's digital mixer, then out through the soundcard's DAC. That's two completely unnecessary conversions between analog and digital, and that spells "yuck".

It would be preferable if we could avoid all that. We can, by "ripping" the audio data off the CD and sending it to the soundcard's digital-to-analog converters. In many cases this is a big improvement. Techniques for doing this are described below, but first, David Balazic warns:

"There are big problems with [ripping the audio data off the CD]?. Because CD-DA have less error correction data and very basic positioning data, the reading by computer is very error prone. Sometimes the drive doesn't return exactly the sector requested ( they say this happens sometimes even with very good drives , like Plextor ). And sometimes when there is a read error the drive just returns some random ( or zeroed ) data , without bothering to say 'hey, I couldn't read this sector', it just report as everything OK."

Sanjay Rao writes of one solution: Use cdparanoia.

"The point: One can copy an audio CD to a hard disk or data CD then play it back through an SPDIF output to a DAC and get cheap high quality CD audio (or at least relatively high) for cheap. It takes minimal CPU. The quality of cdparanoia's copy is significantly higher than a mass market cd transport, and given that one already has the hardware, at least $300 cheaper."

Even if you don't have digital outs, you can still use the same procedure to play through your soundcard's line outs, which eliminates the first DAC and ADC from the signal chain. That should be a big improvement.

Andy Lo A Foe has a more convenient solution: his AlsaPlayer?, among other things,

"...supports CDDA playback of an audio CD through the DAC of the soundcard. It works very well on CD... Of course it does this in real-time with very little CPU overhead and without the need of copying the data to disk first. There is an added benefit of being able to visualize and/or modify the data before it's sent off to the soundcard..."

Benno Senoner points out that the low-latency patches described in the section on latency can also make CD ripping more reliable:

"After running the cdda2wav as a regular user , so that it could not acquire SCHED_FIFO (realtime priority) privileges, running low-latency software (for example a realtime FX processor) while ripping CDs? at 24x speed worked perfectly. Again I was able to get 2.1ms latency.

That means we would be able to run our DJ mixing software with RT effects etc, while in background we rip CDs at maximum speed. (and maybe even compressing them using an mp3 encoder). Try to perform all these tasks simultaneously on windoze. :-)

Page history Last edited Sat, 23 Feb 2008 08:40:05 -0600 Edit this page