Beijing 167 P.O. Box (100036) Wang Yajun
----This article describes the Red Book format for music CDs. From how to use the WINDOWSMCI interface function according to the data format, the paper uses some algorithms to compute the CD ID number, which can be used to uniquely identify CD and so on, and has certain application value.
First, the Red Book format
----in the CD-ROM format family, we are more familiar with the red paper, yellow paper, white papers and Orange book and many other standards. One common feature of these formats is that the CD-ROM minimum allocation unit is a 2,352-byte sector, and of course, not all 2,352 bytes are available to the user, depending on which criteria. For example, the yellow paper format of 2,352 bytes to deduct some errors and error correction costs, only 2048 bytes are really stored user data.
The----Redbook format was issued by Philip and Sony in 1980, also known as the Cd-da format, is the standard for controlling audio CDs. It is an international standard ISO10149. Red Book standard specification of the disc size, plastic optical parameters, playback environment, signal measurement, fidelity and music waveform digital file structure. The digital way of the Red Book audio is 44.1kHz sampling frequency, 16 level quantization level and dual channel record and linear format. Has now become a fact standard in the music industry. The main contents are as follows:
Up to 99 songs (track, that is, audio track);
2352 bytes per sector are used to store sound data;
The sound data is a PCM signal with a sampling rate of 44.1K and 16 bit quantization.
Stereo
No directory and file structure, continuous storage of PCM signals;
The speed of 75 sectors per second when playing;
Each disc is up to 74 minutes.
----audio data is not as sensitive to errors as other computer data (such as program files) (generally it is not tolerable for error-sensitive data to tolerate 1-bit errors), so 2,352 bytes per sector can be used to hold audio data without additional error-correcting overhead. In this way, each sector can hold music time of 2352/(16/8x2x44100) =1/75 seconds, so the playback speed is 75 slices/sec. The sector address has a one by one correspondence with the playback time; in the CD-DA format, represented in the time MSF format, marked as a 00:00:00 format:
----M: minutes, expressed in one byte;
----S: The number of seconds, the range 0~59, expressed in a byte;
----F: Sector number, range 0~74, expressed as a byte, representing how many 1/75 seconds.
----under the ISO 9660 standard, a single CD-ROM is defined as a "volume" and the first 150 sectors are used to hold the starting time of each track and the label, copyright, and so on of the disc itself. So, the transition from MSF to absolute sector addresses is:
----address=m*60*75+s*75+f+150;
----myself in the development of a personal CD collection database found that each CD publishing company has its own CD number specification, can not be unified, such as: DG 437667-2. Therefore, it is necessary to adopt an algorithm to uniquely identify a single CD. Based on the above analysis, the following algorithm is proved to be feasible.