Method for controlling flow rate when calling MCI recording WAV

zhaozj2021-02-16  62

When writing a recorder, the easiest way is to call the MCI control. However, sometimes we have to record for a long time, and the requirements for sound quality are not too high, and the default sampling frequency of this control is: 22.05kHz, 8 bits. In the case of a mono, its flow rate is 21 kb / s. At this time, the document recorded is very large (such as an hour's voice is: 21kbx60x60 = 75600KB nearly 74MB), want to modify the sampling frequency when the recording is modified, because it is not when, the recorded sound requires high-fidelity, but I have passed this. The instructions of the control have not found a method of controlling the sampling frequency. After the study found that when new empty WAV files, it is a 58-byte file, and when the documentation about the WAV file format is found, this is found to record the sampling frequency, the number of channels, the number of frames, the number of samples, etc. Information file header. So as long as the empty file we want is the empty file we want, you can change the sampling frequency, so that the files we have to have smaller. The method of generating such a file is: There is a recorder in the entertainment in the attachment. At this time, we will not recording, but the "File" menu, select "Properties", in the dialog box, "Re-conversion" In the "Properties" drop-down box in the box, choose the desired sampling frequency, because I have to record for a long time, and I have no high quality requirements, so I chose 8Hz, 8, mono, this time there is only the flow rate 7kb / s, then save this file (if there is no recording, it should be 58 bytes), so that I recorded the file, only less than 7kbx60x60 = 25200KB is less than 25MB an hour. The same reason is to record better quality sounds, and when using a two-channel recording, it can also be adjusted by this method.

转载请注明原文地址:https://www.9cbs.com/read-24803.html

New Post(0)