A beginner-friendly explanation of how digital sound works, covering the physics of sound waves, sampling theory, PCM encoding, and WAV file format. Explains how analog sound is converted to digital samples, why 44.1 kHz is the standard CD sample rate (Nyquist theorem), how to store samples as 16-bit signed integers, and how to generate tones programmatically in C. Also covers audio mixing by summing waveforms and the clipping problem that arises when combined amplitudes exceed the valid range.
Sort: