home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7155 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  3.3 KB

  1. Path: sparky!uunet!ogicse!news.u.washington.edu!uw-beaver!uw-coco!nwnexus!sounds!brianw
  2. From: BrianW@SoundS.WA.com (Brian Willoughby)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: (failing to) read Audio Data from CDROM
  5. Message-ID: <BxKDBu.AA@sounds.wa.com>
  6. Date: 11 Nov 92 18:14:17 GMT
  7. Article-I.D.: sounds.BxKDBu.AA
  8. References: <1992Nov3.081243.26623@u.washington.edu>
  9. Sender: brianw@sounds.wa.com (Brian Willoughby)
  10. Reply-To: BrianW@SoundS.WA.com
  11. Organization: SoundSoftware, Bellevue, WA, USA
  12. Lines: 47
  13.  
  14. Sean T. Lamont writes
  15. | In article <1992Nov2.172257.14250@anarch.do.open.de> erik@amg.de writes:
  16. | >constantly failed working when I inserted audio CDs. However, it works fine  
  17. | >with data CDs although the "music" isn't too enjoyable...
  18. | There is a fundamental problem with your entire strategy.  CD disks are
  19. | built with an encoding written onto the disk which specifies whether you
  20. | can read data off the disk in digital format or not.  on CD-rom disks are
  21. | obviously set to "true", with audio CDs having the bit set to "false"
  22. | The implementor of the drive, of course, is free to ignore this
  23. | specification.  However, the only one I've heard of that does is the one
  24. | shipped by SGI.
  25.  
  26. The differences between audio and data CDs are a little more complicated than  
  27. that.  The simplest way I can think of explaining it is that audio CDs are like  
  28. "unformatted" disks and CD-ROM is like "formatted" disks.
  29.  
  30. An audio Block on a CD contains 2352 bytes of audio data.  The exact same block  
  31. only provides 2048 bytes of computer data on a CD-ROM; the additional 304 bytes  
  32. are "wasted" as sync, header and aux data.  So, when you read a "block" from an  
  33. audio CD, you are missing 13% of the data.  The manufacturers aren't really  
  34. going out of their way to prevent reading of audio data, they're actually just  
  35. using off-the-shelf chips which either interpret CD audio or CD-ROM data.  Most  
  36. manufacturers connect the output of the CD audio chip to the audio circuitry  
  37. and connect the output of CD-ROM chip to the computer interface.  SGI (or the  
  38. maker of their drive) has taken special measures to make the CD audio data  
  39. available on the computer interface as well.  They probably have some  
  40. proprietary way of sending the entire 2352 bytes instead of only 2048.
  41.  
  42. There are 6 stereo 16-bit samples (24 bytes) in a Frame on a CD.  Each Frame  
  43. has an extra byte for subcode.  It takes 98 Frames to make a Block (which has  
  44. the time in seconds encoded into the 98 subcode bytes).  You can't really seek  
  45. on a CD except to a block address because you are technically seeking to a  
  46. specific second (there are 75 Blocks per second).  CD audio was designed first,  
  47. and then CD-ROM came around as an afterthought.  Since there were already Block  
  48. limitations in the audio design, I guess they thought it would make sense to  
  49. throw away 288 auxiliary bytes with every block to keep things aligned.
  50.  
  51. There are subcode bits in each Block which indicate whether the data is audio  
  52. or computer and whether it is copy protected or not.  But, you can see that it  
  53. doesn't do much good to enable a computer to read audio blocks unless all 2352  
  54. bytes are sent across the interface instead of just 2048.
  55. -- 
  56. Brian Willoughby    Software Design Engineer, BSEE NCSU
  57. BrianW@SoundS.WA.com    Sound Consulting and Signal Processing Software
  58. NeXTmail welcome    - NO EMAIL SOLICITATION without prior permission
  59.