home *** CD-ROM | disk | FTP | other *** search
- From: vosse@ruls41.LeidenUniv.nl (Theo Vosse)
- Subject: Code for reading digital audio with a CD300; here it is!
-
- Hi.
-
- As promised (in comp.sys.mac.programmer), my code to get digital audio
- directly from CD into your mac. Beware, you need an Apple CD 300!!!
- You can specify the section you want to download and in what format
- you want to save it (8/16 bit, mono/stereo, 11/22/44 kHz). The sound
- is always saved as a system 7 sound, which means that you need Sound
- Manager 3.0 to be able to play 16 bit sounds!
-
- The code is intended for use with THINK C 5. I suppose you'll have to
- go through some trouble when you're using another compiler. The
- program is more or less (well, less) in mac style: initially, it shows
- you a dialog in which you can specify begin and end track and time,
- plus some conversion options. You need 176400 bytes of RAM for every
- second of digital audio you are downloading, even if you convert it
- directly to mono, 8 bits, 22kHz. The (dialog) resources are included
- at the end.
-
- The code is pretty straightforward, although the function MaxVal(),
- used for normalization of the sound, contains some quirks: for some
- sounds it introduces an ugly clipping effect!
-
- Originally, I programmed some SCSI-routines to read the data (that was
- before I knew there was a cleaner way to do it with ToolBox calls).
- For completeness sake, I have included the SCSI parts at the end. They
- were partially derived from code by Thomas R. Shaw. The relevant
- information from the cdrom-faq is also included.
-
- If you have any questions, comment or praising remarks, feel free to
- post them or mail them to me. Have fun!
-
- Theo Vosse
- ----------
- Unit for Experimental Psychology
- University of Leiden
- The Netherlands
-