home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Snippets / digitalaudio / digitalaudio README next >
Encoding:
Internet Message Format  |  1994-04-21  |  1.7 KB  |  [TEXT/R*ch]

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