Generic RWAC Wave Content

From Burnout Wiki

Sometimes referred to as RWAC Wave or simply Wave, the Generic RWAC Wave Content resource type is a container for the EA SndPlayer Plug-In Asset. This is the primary sound asset type used throughout the game.

Generating assets[edit | edit source]

Waves can be generated (without a Binary File header) by the EA Sound Exchange command-line tool. For more information on specifics, see Sounds (Burnout Paradise).

Codec[edit | edit source]

As noted in the enumeration, there are several codecs to choose from when encoding. Burnout primarily uses EALayer3, a proprietary offshoot of MPEG Layer 3, or its Spike variant. It also uses XAS certain engine sounds, namely ignition, for reasons unknown. The Xbox 360 version uses EA-XMA for all audio except acceleration/deceleration, which is done with Ginsu resources.

Play location[edit | edit source]

Three play locations are supported: RAM, stream, and gigasample. RAM-targeted assets are self-contained and generally found in engines, splicers, and AEMS banks, while streams have data separate from the header and stored in persistent memory instead of RAM. Gigasamples are like streams, but with a portion in RAM so slow access times on the stream portion do not slow playing of the asset.

Loops[edit | edit source]

When loops are enabled with the -loops (loop start) option, the loop flag is toggled and the specified sample is written to the header. -loope (loop end) may also be specified, though it is unclear where this is stored.

Data[edit | edit source]

In these assets, sound data is stored in chunks to be loaded, played, and unloaded in sequence. This is done to minimize RAM usage and increase streaming efficiency. All other data is that of the sound itself.

Structures[edit | edit source]

Note: Waves begin with a Binary File resource. (Not subject to the following note.)
Note: Data is stored in big endian byte order regardless of platform.

Header[edit | edit source]

Offset (bits) Length (bits) Constant Name Description Comments
0 4 SNDPLAYER_VERSION_BITS Version number 0 in Burnout
4 4 SNDPLAYER_CODEC_BITS Codec See SndPlayerCodec
8 6 SNDPLAYER_NUMCHANNELS_BITS Number of channels Offset by 1 such that 0 = 1, 1 = 2, etc.
14 18 SNDPLAYER_SAMPLERATE_BITS Sample rate Expected maximum of 192 kHz but can hold up to 262 kHz
32 2 SNDPLAYER_PLAYTYPE_BITS Play type See SndPlayerPlayType
34 1 SNDPLAYER_LOOPFLAG_BITS Sets whether the asset is looped
35 29 SNDPLAYER_NUMSAMPLES_BITS Total samples in the asset
32 SNDPLAYER_LOOPSTART_BITS Loop start sample Optional. Exists only if loop flag is 1
32 SNDPLAYER_GIGA_RESIDENT_NUMSAMPLES_BITS Total samples in RAM portion (SNR) Optional. Exists only if play type is gigasample.
32 SNDPLAYER_STREAM_OFFSET_LOOPSTART_BITS Loop start offset in stream portion (SNS) Optional. Exists only if loop flag is 1 and loop start is in stream portion.

Example header[edit | edit source]

This represents a typical stream with no additional fields used.

Hex: 05 04 BB 80 40 07 80 AA
Bit value 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0
Parsed value 0 5 1 48000
Description Version 0 EALayer3 codec 2 channels (stereo) 48 KHz sample rate
(cont.) 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0
1 0 491690
Stream play type Not looped 491690 total samples

Chunk[edit | edit source]

Offset Length Type Name Description Comments
0x0 0x4 unsigned int bytes Number of bytes in the chunk
0x4 0x4 unsigned int samples Number of samples in the chunk

Enumerations[edit | edit source]

EA::Audio::Core::SndPlayerCodec[edit | edit source]

Name Value Comments
SNDPLAYER_CODEC_XAS_INT 0
SNDPLAYER_CODEC_EALAYER3_INT 1
SNDPLAYER_CODEC_SIGN16BIG_INT 2
SNDPLAYER_CODEC_EAXMA 3
SNDPLAYER_CODEC_XAS1_INT 4
SNDPLAYER_CODEC_EALAYER31_INT 5
SNDPLAYER_CODEC_EALAYER32PCM_INT 6
SNDPLAYER_CODEC_EALAYER32SPIKE_INT 7
SNDPLAYER_CODEC_GCADPCM 8
SNDPLAYER_CODEC_EASPEEX 9
SNDPLAYER_CODEC_ATRAC9 10
SNDPLAYER_CODEC_EAMP3 11
SNDPLAYER_CODEC_EAOPUS 12
SNDPLAYER_CODEC_EAATRAC9 13
SNDPLAYER_CODEC_MULTISTREAMOPUS 14
SNDPLAYER_CODEC_MULTISTREAMOPUSUNCOUPLED 15
SNDPLAYER_CODEC_MAX 16

EA::Audio::Core::SndPlayerPlayType[edit | edit source]

Name Value Comments
SNDPLAYER_PLAYTYPE_RAM 0
SNDPLAYER_PLAYTYPE_STREAM 1
SNDPLAYER_PLAYTYPE_GIGASAMPLE 2
SNDPLAYER_PLAYTYPE_MAX 3