![]() this functions reads binary audio data from a cd and stores it in a jagged array called TrackData Put the sector data into the appropriat4e place in the TrackDataĬlose the handle to the drive using CloseHandle in kerenl32. Then we retrieve the sector data just read. Now we read that sector via DeviceIoControl. (Remember CD sectors are a little different than HD sectors more on The structure informs the DeviceIoControl call that we are reading aĬD and that we are reading one sector where he sector is on the disc. We create a kernel32 RAW_READ_INFO structure to be used in the Now we iterate through all sectors in this track. Track size is expressed in number of sectors by subtracting start Side note: There are many pointers to structures and byteĪrrays so there is also a lot of converting back and forth between Using that structure we are able to determine which sector holds theĪnd the l sector will be one sector less than the start sector of the We cast the TOC track data into a kernel32 structure called We create a binary writer for use in writing the binary files. Using the TOC we determine how may tracks there are on the CD (noįile IO here we already have the TOC). If the TOC is valid then we next read the TOC using DeviceIoControl. (hereafter refereed to as TOC) again using DeviceIoControl. If the drive is ready then we see if it has a valid Table of Contents Next we use that handle to see if the drive is ready to read using ![]() It then gets a handle to the drive via a call to CreateFile in The readcd procedure verifies that the drive is a cdrom drive You have to use some unmanaged memory and pointer to read data from the cd. It's not that easy converting a cda to wav file. ![]()
0 Comments
Leave a Reply. |