LPCM format

From ModdingWiki
Jump to: navigation, search
LPCM format
Format typeSound
Number of soundsUnknown
Sampling rateUnknown
Channel count1
Bits per sample8

Linear pulse-code modulation (LPCM) is a specific type of PCM (pulse-code modulation) where the quantization levels are linearly uniform. This is in contrast to PCM encodings where quantization levels vary as a function of amplitude. Though PCM is a more general term, it is often used to describe data encoded as LPCM. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled regularly at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps.

A PCM stream has two basic properties that determine the stream's fidelity to the original analog signal: the sampling rate, which is the number of times per second that samples are taken; and the bit depth, which determines the number of possible digital values that can be used to represent each sample.

In short such data consists of an uncompressed steam of data where a certain number of bytes represents a piece of a soundwave. Playing a specific amplitude for each 'tick' of time will reproduce the sound to varying levels of fidelity depending on how often the sound was sampled. It is a highly inefficient way to store audio data as even very poor quality audio must be sampled several thousand times per second.

In most early games using this format the sampling rate is either very low, around a tenth of a standard wave file, (All Dogs Go To Heaven) or the game 'smoothed' or altered the data to improve quality (Jazz Jackrabbit). The stream is read as mono (rather than stereo) with 16 bits per sample. This makes the format exceedingly simple, lacking any organization or compression of any kind aside from the raw sound data.