Practical Analog and Digital Filter Design

There are a number of sound file formats in use today, but one of the most popular is the WAVE file format (.WAV). This file format has a number of different ways that the file information can be stored, but we will concentrate on just the basic techniques. We discuss only the formats for monaural and stereo signals with either 8 bits or 16 bits per sample. Compression schemes are popular today to save space in transferring or saving music files, but we will concentrate only on uncompressed files. We will see that handling four different options will provide us with enough challenge for now.
Each sound file begins with a header of information that describes the important characteristics of the file such as sampling frequency, number of samples, number of channels (mono or stereo) and number of bits per sample. For our work, the header information for each file is shown in Table I.1.
| Bytes | Description |
|---|---|
| 0 3 | "RIFF" identification string |
| 4 7 | Reserved |
| 8 15 | "WAVEfmt " ID string ( = space) |
| 16 19 | Reserved |
| 20 21 | Type of format short integer |
| 22 23 | Number of channels short integer |
| 24 27 | Samples per second long integer |
| 28 31 | Average bytes per second long integer |
| 32 33 | Block alignment short integer |
| 34 35 | Bits per sample short integer |
| 36 39 | "data" identification string |
| 40 43 | Number of data bytes long integer |
After the header information, the raw data for the sound file is provided in...