The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

cdda-fs: Guarantee successful lookups

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

Update: CDDB disabled access to all unlicensed utilities sometime in Feb. or March 2001. You’re now pretty much forced to use freedb, rather than cddb. If you’ve been telling cddblinkd to use cddb, you’ll have to remove that parameter from your cddblinkd startup line.

The old tip remains for posterity.

When you mount an audio CD, its tracks appear as WAV files in the Tracker. These WAVs aren’t really WAVs, but the cdda filesystem driver makes the OS and all applications think that they are. You can play these WAVs through MediaPlayer, SoundPlay, CL-Amp, or other audio players. BeOS MP3 encoders such as RipEnc can also use cdda-fs to encode directly from CD, without ripping first. And of course you can drag audio tracks direcly off the CD and into the Tracker.

To really make cdda-fs useful, run the cddblinkd daemon in the background. When cddblinkd is running, it will detect when an audio CD has been mounted, look it up in a compact disc database, and rename the CD to “Artist Name – Album Name” and all of the WAV files will be renamed with the actual track names.

cddblinkd can be downloaded here (a pre-compiled cddblinkd binary is also distributed with RipEnc) . Once you have the archive, open a Terminal, enter the source directory, and type “make”. When the compile is finished, move the cddblinkd binary to ~/config/bin and type

cddblinkd &

into the Terminal. To make sure cddblinkd is always running, put the above line in your ~/config/boot/UserBootscript.

You may find that a certain percentage of CDs aren’t looked up successfully. This is because cddblink queries only one database by default: freedb.freedb.org.

freedb is cool because it doesn’t make unreasonable requirements of developers (such as the requirement that applications making use of it display the CDDB logo). Unfortunately, freedb is also much smaller than CDDB.

If you want cddblink to stand a better chance of finding your CD, go back to the cddblinkd source directory, open cddblinkd.cpp in a text editor, and search on the string “freedb.freedb.org”. Edit this to read “cddb.cddb.com” and remake the binary.

CDDB is a much larger database, but note that it’s your responsibility to make sure the new binary follows the licensing requirements established by CDDB.

Posted in Applications


(comments are closed).