Generic RWAC Wave Content
GenericRwacWaveContent | |
---|---|
aka Generic Wave Content | |
Type ID | 0xA020 |
Category | Sound |
Memory distribution |
Main Memory only |
Editor available? |
Yes* *EALayer3 codecs only Use EALayer3 |
Sometimes referred to as simply as waves, 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.
For reference, RWAC (RenderWare Audio Core) is the audio library used by Burnout Paradise and other EA games.
Generating assets
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
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
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 initial playback of the asset.
Loops
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
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
Note: Waves begin with a Binary File resource which are not subject to the following note.
Note: Data is stored in big endian byte order regardless of platform.
Header
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
This represents a typical stream with no additional fields used.
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
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
EA::Audio::Core::SndPlayerCodec
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
Name | Value | Comments |
---|---|---|
SNDPLAYER_PLAYTYPE_RAM | 0 | |
SNDPLAYER_PLAYTYPE_STREAM | 1 | |
SNDPLAYER_PLAYTYPE_GIGASAMPLE | 2 | |
SNDPLAYER_PLAYTYPE_MAX | 3 |