Notes on digital audio extraction

Audio CDs don’t contain a filesystem that’s automatically readable by operating systems, so users need special utilities or OS support capable of translating the bits in the audio tracks into computer-readable data such as .WAV or .AIFF files. This process is known as Digital Audio Extraction, or DAE, and requires that the drive be capable of doing accurate error-correction to ensure perfect „rips.“
While the vast majority of CD-ROM drives made in the last few years support DAE natively, some do not. When shopping for a drive, always make sure you get a DAE-capable drive. Nearly all geeks agree that drives made by Plextor are the king when it comes to fast, accurate DAE. Plextor also provides a Windows utility that will let you view your audio tracks as .WAV files, sort of like cdda-fs does for all CD-ROM drives in BeOS, but without the CDDB lookup.
Some BeOS users complain of difficulty doing DAE in BeOS, even with a DAE-capable drive. If you’re having DAE problems, there are several things you can investigate:

  • Go into your computer’s BIOS and change the PIO Mode from 4 to 2.
  • If you use IDE drives, put the CD-ROM drive on a bus separate from your main hard drive. The IDE bus can only access one drive at a time, and while rapid time-sharing usually works, problems can crop up if you’re trying to use both drives intensively and simultaneously.
  • Use shorter IDE cables. The IDE spec calls for a cable length limit of 40cm, though some vendors ship longer cables by default. Some operating systems have workarounds for this, while BeOS adheres more closely to the spec.
  • Using techniques outlined in the tip Make Boot Options Permanent and at the BeOS Bible R4.5 Update Site, edit ~/config/settings/kernel/drivers/atapi and force DMA on (un-comment the last 11 lines in the file). Some DMA-capable drives don’t announce their DMA capabilities to the system automatically.
  • If you’re using cdda-fs, increase the buffer size in ~/config/settings/kernel/drivers/cdda. According to Marco Nellisen, lowering the blocksize in that same file may also help, since some drives don’t handle large blocksizes (with the default of 64 sectors qualifying as large) and will read very slowly, if at all.

[Editor’s note: Ripping digital audio from CD-ROM drives cleanly is largely dependent on capabilities built into the drive’s firmware. While most CD-ROM drives can do digital audio extraction, some makes and models are better at it than others. Peter Urbanec offers these notes, which may be useful when purchasing your next CD-ROM drive.]
It’s all in the firmware. The brand and model of your CD-ROM will make the biggest difference.
SCSI-1 had no standards for any audio operations.
SCSI-2 introduced audio playback operations into the standard, but only in a very limited way.
SCSI-3 is a lot more complete and defines a complete set of audio related operations, including playback, audio seeking (aka FFWD and REW) and audio extraction.
ATAPI drives use a variant of SCSI-3 over the IDE bus to achieve similar capabilities.
Since ATAPI devices are what they are (mainly cheap clones), their firmware performs correspondingly. Most of the ATAPI drives are poor audio performers. Some Toshiba drives are good, others are not. Avoid Acer, Cyberdrive and TAEIL – from my experience, their firmware is shockingly bad.
Good SCSI drives are Pioneer, Yamaha CD-RW drives (firmware after December 98) and some of the newer Plextors.
When I wrote CDDA support for BeOS, I wanted to present a uniform and reliable frontend for audio operations. There are lots of things that you can do with specific models of CD-ROM drives, but most of this stuff is vendor specific and only applicable to certain models. The current CDDA API in BeOS is built for consistent and predictable behaviour across a wide range of hardware.
Developers: If you want to do „special“ stuff, you will need to hit the hardware directly. You will find that in 99% of cases, this is not required and it is not worth the extra effort.
For a great explanation of DAE issues in general, see About Digital Audio Extraction



No comments so far.

(comments are closed)