.wav file research

Because to start the SD card to read the wav file playback, so advance research under the .wav file format.

The following is quoted:

=============================================

Number of header bytes Description
00H 4 char "RIFF" flag
04H 4 long int File length
08H 4 char "WAVE" flag
0CH 4 char "fmt" flag
10H 4 bytes transition
14H 2 int format category (10H voice to PCM form data)
16H 2 int channel number, 1 for mono, two-channel to 2
18H 2 int sampling rate (number of samples per second), the play speed of each channel,
1CH int. 4 Long wave audio data transfer rate, which × number of data bits per second is the number of channels × number of data bits per sample / 8
20H 2 int adjustment data block number (byte count), the number of channels × a value of a data bit per sample value / 8.
22H 2 bits per sample data, data indicating the number of bits of each sample in each channel. If there are multiple channels, for each channel, the sample sizes are the same.
24H 4 char data identifier "data"
length 28H 4 long int speech data

=============================================

First, the length of the voice data obtained at 0x28.

Reproduced in: https: //www.cnblogs.com/artechliu/archive/2011/06/20/2083747.html

Guess you like

Origin blog.csdn.net/weixin_33874713/article/details/93275466