www.pudn.com > cdx.zip > README.1ST
19 April 1994 This package is a freeware source code kit for a CD Audio utility for DOS. It uses low-level MSCDEX functions to do its job. I've been interested in writing a soup-to-nuts CD Audio Windows app for a while and find the Multimedia functions in Windows to be somwhat slow. They're also limited in that they don't support access to all of the housekeeping info (and none of the raw audio data) stored on a Redbook (audio) CD. One of the things I was interested in accessing was the UPC string audio CDs are *supposed* to possess, so that I'd have a completely unique ID for all audio CDs encountered by my program. It turns out that UPCs aren't normally found on audio CDs, but in porting this code to work under Windows I learned a lot of other interesting stuf, but that's another story.... Anyway, CDX (the principal program contained in the kit) is a nice little command-line util for controlling an audio CD from DOS. The version of CDX contained in this archive was created using Borland C++ 3.1, altho with a few minor changes it would work just as well with MS C++. In fact, the 1st cut of my Windows port has been compiled w/ VC++ 1.0 and works very well. The program, as supplied, compiles cleanly and generates no warnings or errors of any kind. This is a real C++ program, altho it didn't have to go that way, because I don't think that "objectifying" the interface has really added to the clarity of the code and the services it provides. I picked up the original sources from the BBS ether, but it was a non-working pile of junk. After a week or so of steady work, I was able to not only get this to compile but I also understood how CD audio programming works and was able to flesh out a C++ framework that seems to make some kind of sense. However, one should be aware that this is still a work-in-progress and there are a few aspects of the project that haven't been fully implemented or (for that matter) completely thought out, since I stopped working on the DOS version. Case in point: I noticed, when testing the program on a self-loading, dbl-speed Mitsumi drive, that the program should wait a few seconds for the drive to become ready after loading a disk, so that the TOC can be read on a single pass. The theory of operations is simple. The main program module is CDX.CPP. Its main() fn initializes the CDRom class, then instantiates a CDRom object and issues hi-level commands to that object, corresponding to the types of things a user would want to do w/ an audio CD. The main pgm also displays the CD's TOC (Table of Contents) and the status of the current audio program in progress. The CDRom class translates these hi-level commands into MSCDEX commands via the IOCTL class. The driver program only performs a single hi-level command at a time, but that was all that was needed to get the project started. There is also a trivial program included (CDS.EXE) that shows a minimal use of the classes, which I used to check out a couple of routines (that didn't fit into CDX) and certain MSCDEX status operations. The code has loads of comments, so there should be no ambiguity about how things work. I haven't done anything to support multiple CD drives on a system, altho that aspect of the code can be fleshed out w/ in an hour or two. I've also subsequently discovered that the CDRom::PlayPreview() fn isn't well implemented because it samples the Q-Channel for the end of the audio span and can result in some weird results that may cause the sampling loop to fail. (The 1st Windows port simply lets each preview span terminate before commencing to the next track to preview.) I had to change the memory management scheme for the Windows port and struggled with this for quite a while, hence there is no longer a single source for all versions of the code. One minor improvement implemented for the Windows port is that the IOCTL class now uses the DOS multiplex interrupt to talk to the driver instead of directly calling the CD-ROM device driver strategy/interrupt routines. Finally, this code is committed to the public domain, so do with it as you will, as long it's understood that I take absolutely no responsibility for anything that may happen as a result of using any code or programs in this kit. CDX has been tested on three different CD-ROM subsystems and works well w/ all of them. Hope you have fun w/ it.... Jethro Wright, III Hempstead, NY