From owner-freebsd-questions Thu Jan 18 13:42:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from wasp.eng.ufl.edu (wasp.eng.ufl.edu [128.227.116.1]) by hub.freebsd.org (Postfix) with ESMTP id 5F4EE37B401 for ; Thu, 18 Jan 2001 13:42:31 -0800 (PST) Received: from eng.ufl.edu (scanner.engnet.ufl.edu [128.227.152.221]) by wasp.eng.ufl.edu (8.9.3/8.9.3) with ESMTP id QAA18621; Thu, 18 Jan 2001 16:42:22 -0500 (EST) Message-ID: <3A67633C.1ADE2FE6@eng.ufl.edu> Date: Thu, 18 Jan 2001 16:42:20 -0500 From: Bob Johnson X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en, eo MIME-Version: 1.0 To: Mike Meyer Cc: questions@freebsd.org, r.j.steehouder@student.utwente.nl, dhagan@colltech.com Subject: Re: [FBSD-Q] Re: Burning Audio CD's w/ IDE CD-RW drive References: <14950.32096.857110.50397@guru.mired.org> <3A670705.ABEF177F@eng.ufl.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bob Johnson wrote: > > Mike Meyer wrote: > > > > Bob Johnson types: > > > Rogier Steehouder wrote: > > > > > > 2) Burn that track onto a cd-r (burncd -f /dev/acd1c audio filename > > > > > > fixate?) > > > > > That's right. burncd will accept wildcards, so all of the files > > > > > generated by dagrab can be burned with something like: > > > > > $ burncd -f /dev/acd1c -e -s4 audio track*.wav fixate > > > > Have you tried this? Does burncd convert .wav to CD audio format? > > > > I suspect the result of the procedure above will sound like random noise. > > > It works fine. I've done it several times. > > > > The cdrecord man page implies that wav files are in the right format, > > but the header needs to be skipped. Failing to skip the header will > > cause a click at the start of the track (as it plays the > > header). Do you get such a click on the track? > > > > I started thinking about it after my previous message and > realized that is probably what is happening. A wave file is > basically raw audio with a header added. I had never noticed it > before, but if I listen very carefully I can hear the click at > the start of the track. It's at the start of the silent lead-in, > and is an extremely short click. I would have never noticed it > if I had not been looking for it. Someone with better ears or > better equipment might notice it, though. > > I would think that it would be very easy to strip off the header > (with dd, for example) if you knew the details of the wave file > format. It turns out that the headers add up to 42 bytes at the > start of the file. Raw CD audio is 44,100 samples/second, 32 > bits per sample (16 for each channel), so that 42 byte header > will produce about 0.2 ms of audio, and because it is relatively > random audio, it doesn't produce a click that is as loud as it > would be if the data were, for example, all ones. > > When I get a chance I'll see what happens if I try to strip > the header off before I record the CD. > I miscounted: the header is 44 bytes, which is 11 stereo samples (16 bits per channel). The fact that it works out to an integer number of samples is why you can get away with leaving the header in place: you don't end up out of sync with the data. I used $ dd if=track01.wav of=track01.raw skip=11 bs=4 to strip the header, it took four or five minutes per file. The clicks are gone, but that is just too painfully slow. I poked around and it turns out that the afsp port includes a program called CopyAudio that will do the trick, and much faster: $ CopyAudio -F noheader -Dinteger16 track01.wav track01.raw dagrab is supposed to allow you to invoke this automatically with the -e option, but it didn't work for me. So, to summarize, a procedure you can use to copy an audio CD is: $ dagrab -d /dev/acd0c -a $ CopyAudio -F noheader -Dinteger16 track01.wav track01.raw (repeat for each .wav file) $ burncd -f /dev/acd1c -s4 -e audio track??.raw fixate - Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message