WAV: Difference between revisions
SirYodaJedi (talk | contribs) mNo edit summary |
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
'''Waveform Audio File Format''' is an audio format with a {{code|.wav}} file extension, used by all of Valve's engines. It is required for [[Faceposer|lipsynced dialogue]] and [[Looping a Sound|looped sounds]] without a custom audio backend. | '''Waveform Audio File Format''' is an audio format with a {{code|.wav}} file extension, used by all of Valve's engines. It is required for [[Faceposer|lipsynced dialogue]] and [[Looping a Sound|looped sounds]] without a custom audio backend. | ||
{{gldsrc|4}} 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 | {{gldsrc|4}} 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, without any interpolation. | ||
{{src|4}} supports uncompressed 8-bit and 16-bit PCM, as well as [[compression|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 and 48000 Hz, will not play. | {{src|4}} supports uncompressed 8-bit and 16-bit PCM, as well as [[compression|compressed]] 4-bit Microsoft ADPCM (not IMA). It supports sample rates at 11025 Hz, 22050 Hz, and 44100 Hz; files at other sample rates, such as 32000 Hz and 48000 Hz, will not play. | ||
{{note|Custom audio backends, such as [https://pastebin.com/L5BTxMVW MetaAudio] or [[FMOD]] can extend the range of supported sample rates and bit depths.}} | |||
{{ModernConfirm|What about {{src2|4}}? It definitely supports 16-bit 44.1 KHz WAVs (mono and stereo), but does it support the other formats that {{src}} and {{gldsrc}} support?<br>It supposedly supports arbitrary sample rates for MP3s; is this the case for WAVs as well?}} | {{ModernConfirm|What about {{src2|4}}? It definitely supports 16-bit 44.1 KHz WAVs (mono and stereo), but does it support the other formats that {{src}} and {{gldsrc}} support?<br>It supposedly supports arbitrary sample rates for MP3s; is this the case for WAVs as well?}} | ||
{{bug|Files using the extended [[Wikipedia:Broadcast Wave Format|Broadcast Wave Format (BWF)]] have weird behavior in Source, and should be converted to regular WAV using | {{bug|hidetested=1|Files using the extended [[Wikipedia:Broadcast Wave Format|Broadcast Wave Format (BWF)]] have weird behavior in Source, and should be converted to regular WAV using FFmpeg or Audacity before use in-game. Some audio editors export as BWF automatically, such as Pro Tools and Logic Pro, and do not provide an option to export a standard WAV.}} | ||
{{warning|Although the WAV format specifications permit up to 32 channels in a single file, and {{src}} supports surround sound, {{src}} does '''''not''''' support WAV files with more than 2 channels!}} | {{warning|Although the WAV format specifications permit up to 32 channels in a single file, and {{src}} supports surround sound, {{src}} does '''''not''''' support WAV files with more than 2 channels!}} | ||
Line 56: | Line 57: | ||
|} | |} | ||
Some games (particularly third-party ones) may support additional sample rates and bit depths, but the above sample rates are supported by all {{src|1}} games. | |||
{{tip|{{only|{{src}}{{src2}}}} If lower file sizes are desired, [[MP3]] files can also be used in some situations; see [[Compression (Source 1)#Audio Compression]] for comparisons.}} | {{tip|{{only|{{src}}{{src2}}}} If lower file sizes are desired, [[MP3]] files can also be used in some situations; see [[Compression (Source 1)#Audio Compression]] for comparisons.}} | ||
Latest revision as of 07:20, 20 May 2025
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 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, without any interpolation.
Source supports uncompressed 8-bit and 16-bit PCM, as well as compressed 4-bit Microsoft ADPCM (not IMA). It supports sample rates at 11025 Hz, 22050 Hz, and 44100 Hz; files at other sample rates, such as 32000 Hz and 48000 Hz, will not play.





It supposedly supports arbitrary sample rates for MP3s; is this the case for WAVs as well?




Bit rates
WAV files have a consistent bitrate depending upon their sample rate, bit depth, and channel count. The following tables indicate what bitrates files will be at supported sample rates.

Mono sounds (1 channel)
Stereo sounds (2 channels) (not in )
Sample Rate | 16-bit PCM | 8-bit PCM | 4-bit ADPCM | Quality |
---|---|---|---|---|
11025 Hz | 352.8 kbps | 176.4 kbps | 88.2 kbps | AM radio |
22050 Hz | 705.6 kbps | 352.8 kbps | 176.4 kbps | |
44100 Hz | 1411.2 kbps | 705.6 kbps | 352.8 kbps | CD quality |
Some games (particularly third-party ones) may support additional sample rates and bit depths, but the above sample rates are supported by all Source games.


