This article describes programming information and data specifications for raw audio formats.
Memory or ROM dumps, High quality sampling, sample playback on embedded devices, etc.
Raw files concerned with audio or sampled signals are formats that may be used by some applications or embedded devices to input, process and/or output information. The information is either stored the way it is because:
Generally the discerning aspect of a real raw audio file is the lack of a signature and a header. This aspect makes determining a raw audio file's file format much more harder than interchange formats because of a lack of a signature. Also, the lack of a commonly understood header makes determining audio parameters difficult.
The information stored may be in any kind of depth, ordering, endian-ness and alignment. Note that the information could be in the frequency domain with information on partials for each window, as opposed to a time domain sampled sound, depending on the use of the file.
Its common that a set of raw files will have the same sample rate, encoding type, bit depth, alignment, etc. (though its not always the case) That is, a bunch of raw files in a folder and/or similar filenames will have raw files encoded the same way.
Generally raw files will probably be uncompressed (but this is not always true), and they can be 4-bit through to n-bit depths, they may have any amount of channels and they may or may not be interleaved.
.sam files are by far the most common raw file one can encounter, these are 8-bit signed PCM. They were employed extensively along with EA IFF 8SVX files as samples in Amiga tracker software.
.au files, which are technically NeXT/SUN audio files, can sometimes have no header as their contents were originally to be output directly to the /dev/audio SunOS device file. Without a header they are µ-Law encoded.
.snd files can be .sam files, .au files or anything else really (.snd for .sound, its a generic extension). They can also be Tandy .snd file which are not raw (signature: first byte is 0x1A). They can also be Akai MPC-2000 files (signature: 0x01 0x04). They can also be ROM dumps from specific sampler hardware.
.smp files may sometimes be SampleVision SMP files which are not raw files (signature: 'SOUND SAMPLE DATA '), but they can also be another extension for .sam files. They can also be ROM dumps from specific sampler hardware.
.raw files can really contain anything, the extension really provides no clue.
.pcm files might provide a clue that the file contains linear PCM, as opposed to encodings such as the various types of delta and companding encodings and compressed streams, this could still be any bit depth and ordering.
.bin, .dat and .dmp files that have file sizes in powers of 2, such as 256, 4096, 8192, 32768, 131072 etc. hint to their contents being originally from a PROM / EPROM / EEPROM chip. These chips originate from machines which had the sound encoded in them. Surprisingly the encoding might not be PCM but could a delta encoding such as DPCM or ADPCM especially if the chip capacity is small, like 8,192 bytes. Delta encodings are popular here because it only requires a basic arithmetic logic unit (ALU) on a cheap microcontroller to perform the subtractions, additions and bitwise operations needed. Knowing what other chips are involved in the originating circuit will help to know what the encoding is as well. If there is a known ADPCM decoder chip nearby it might be ADPCM, a known MPEG decoder chip then it could be MPEG ("MP3" encoding). Companding encodings such as µ-Law and A-law are sometimes used as well.
.vmd files could be encountered and they could be 8-bit unsigned PCM at 8000hz.
.dbl files most likely contain 64-bit IEEE floating point audio data. .dbl stands for double, the data type that can hold 64-bit floats in the C programming language.
.f32 files most likely contain 32-bit IEEE floating point audio.
.f64 files most likely contain 64-bit IEEE floating point audio.
.f80 files could likely contain 80-bit IEEE floating point audio (this is getting pretty big).
.sb and .s8 files most likely contain signed 8-bit PCM audio.
.ub and .u8 files most likely contain unsigned 8-bit PCM audio.
.sw files most likely contain signed word (16-bit) PCM audio, byte ordering isn't indicated but it may be Intel ordered ("little endian").
.uw files most likely contain unsigned word (16-bit) PCM audio, byte ordering isn't indicated but it may be Intel ordered ("little endian").
.sdw files most likely contain signed dword (32-bit) PCM audio, byte ordering isn't indicated but it may be Intel ordered ("little endian").
.udw files most likely contain unsigned dword (32-bit) PCM audio, byte ordering isn't indicated but it may be Intel ordered ("little endian").
.sl and .ul files are unfortunately named in a few ways, as they use the C programming language's loosely defined long data type as a reference to the bit depth of the file's content, which could be 32-bit or 64-bit PCM. .sl and .ul would be signed and unsigned files respectively. .ul may alternatively contain µ-Law encoding.
.s16le, .s16be and .s16 files most likely contain signed 16-bit PCM audio. .s16le, .s16be and .s16 contain Intel ordered ("Little Endian"), Motorola ordered ("Big Endian") and unknown ordering respectively
.u16le, .u16be and .u16 files most likely contain unsigned 16-bit PCM audio. .u16le, .u16be and .u16 contain Intel ordered ("Little Endian"), Motorola ordered ("Big Endian") and unknown ordering respectively
.vox files usually contain Dialogic ADPCM at 8000hz
|Interleaved (2 channels)||[L] [R] [L] [R] [L] [R] ...|
|Reversed Interleaved (2 channels)||[R] [L] [R] [L] [R] [L] ...|
|Planar||[L] [L] [L] [L] ... [R] [R] [R] [R] ...|
A raw audio file may or may not necessarily be produced directly by specialized sensor acquisition, as due to the nature of audio acquisition a raw file could be acquired in low radiometric density (say, 1 bit) with high samplerates, which is then filtered to a high resolution, lower samplerate. As well, raw streams can be produced by digital synthesis simply due to exotic representation or a layout which does not match a normal audio setup.