Generic RWAC Wave Content: Difference between revisions

m
Fix infobox
m (Table headers on bit field example)
m (Fix infobox)
 
(6 intermediate revisions by 2 users not shown)
Line 1:
{{ParadiseResourceTypeInfobox
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.
| name = GenericRwacWaveContent
| othernames = Generic Wave Content
| id = 0xA020
| category = Sound
| memdist = SNR in Main Memory<br />Audio data in [[Bundle 2/Burnout Paradise#Memory types|secondary]]
| editor = Yes*<br /><sup><small>*EALayer3 codecs only</small></sup><br />Use [[Modding/Burnout Paradise|EALayer3]]
}}
 
Sometimes referred to as RWACsimply Waveas or simply Wavewaves, 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 ('''R'''ender'''W'''are '''A'''udio '''C'''ore) is the audio library used by Burnout Paradise and other EA games.
 
= Generating assets =
Line 5 ⟶ 16:
 
=== Codec ===
As noted in the [[#EA::Audio::Core::SndPlayerCodec | 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 Wave Content | Ginsu]] resources.
 
=== Play location ===
Three play locations are supported: RAM, stream, and gigasample. RAM-targeted assets are self-contained and generally found in engines, [[Splicer | splicers]], and [[AEMS Bank | 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 playinginitial playback of the asset.
 
=== Loops ===
Line 14 ⟶ 25:
 
=== Data ===
In these assets, sound data is stored in [[#Chunk | 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.
 
= LayoutStructures =
'''Note: Waves begin with a [[Binary File]] resource.''' (Not which are not subject to the following note.)
<br/>
'''Note: Data is stored in big endian byte order regardless of platform.'''
 
=== Header ===
Unlike most structures, the header for these assets is not in bytes, but bits. As such, an example is given to aid in understanding the format.
 
The offset is replaced with the number of bits, from left to right.
 
{| class="wikitable"
! BitOffset (bits) !! Length (bits) !! Constant Name !! Description !! Comments
|-
| 0 || 4 || SNDPLAYER_VERSION_BITS || Version number || 0 in Burnout
|-
| 4 || 4 || SNDPLAYER_CODEC_BITS || Codec || See [[#EA::Audio::Core::SndPlayerCodec | SndPlayerCodec]]
|-
| 8 || 6 || SNDPLAYER_NUMCHANNELS_BITS || Number of channels || Offset by 1 such that 0 = 1, 1 = 2, etc.
Line 37 ⟶ 44:
| 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 [[#EA::Audio::Core::SndPlayerPlayType | SndPlayerPlayType]]
|-
| 34 || 1 || SNDPLAYER_LOOPFLAG_BITS || Sets whether the asset is looped ||
Line 53 ⟶ 60:
This represents a typical stream with no additional fields used.
 
<code>05 04 BB 80 40 07 80 AA</code>
{| class="wikitable"
<code>|+ Hex: 05 04 BB 80 40 07 80 AA</code>
|-
! 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''' || colspan=4 | 0 || colspan=4 | 5 || colspan=6 | 1 || colspan=18 | 48000
|-
| '''Description''' || colspan=4 | Version 0 || colspan=4 | EALayer3 codec || colspan=6 | 2 channels (stereo) || colspan=18 | 48 KHz sample rate
|}
 
{| class="wikitable"
! rowspan=3|(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
|-
| colspan=2 | 1 || 0 || colspan=29 | 491690
! (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
|-
| colspan=2 | 1 || 0 || colspan=29 | 491690
|-
| colspan=2 | Stream play type || Not looped || colspan=29 | 491690 total samples
|}
 
Line 84 ⟶ 89:
=== EA::Audio::Core::SndPlayerCodec ===
{| class="wikitable"
|-
! Name !! Value !! Comments
|-
Line 124 ⟶ 128:
=== EA::Audio::Core::SndPlayerPlayType ===
{| class="wikitable"
|-
! Name !! Value !! Comments
|-