WAV: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Deer King noticed BWF files only play if they're 32-bit; better to avoid them)
Line 25: Line 25:
|-
|-
|}
|}
{{modernTip|
Bitrate = Sample Rate * Bit Depth * Channel Count}}


== External links ==
== External links ==

Revision as of 11:14, 16 May 2023

Waveform Audio File Format is an audio format with a .wav file extension, used by all of Valve's engines. It is required for lipsynced dialogue and looped sounds without a custom audio backend.

GoldSrc GoldSrc supports uncompressed 8-bit or 16-bit PCM, although lip-synched audio must be 8-bit. It supports sample rates of 11025 Hz or 22050 Hz; other sample rates can sometimes be used, but they will be resampled to 22050 Hz before playback.

Source Source supports uncompressed 8-bit and 16-bit PCM as well as compressed 4-bit Microsoft ADPCM. It supports sample rates at 11025 Hz, 22050 Hz, and 44100 Hz; files at other sample rates, such as 32000 Hz, will not play.

Template:ModernBug

Bit rates

WAV files have a consistent bitrate depending upon their sample rate, bit depth, and channel count. The following is a table with the bitrates of mono WAV files; double the values below for stereo WAV files.

Sample Rate 16-bit PCM 8-bit PCM 4-bit ADPCM
11025 Hz 176.4 kbps 88.2 kbps 44.1 kbps
22050 Hz 352.8 kbps 176.4 kbps 88.2 kbps
44100 Hz 705.6 kbps 352.8 kbps 176.4 kbps

Template:ModernTip

External links