SFX

From GTAModding
Jump to: navigation, search
This article describes format of SFX files prior to San Andreas. For explanation of an SFX file in San Andreas see SFX (SA)

SFX is a file archive of short audio effects used in GTA 2, GTA III, and Vice City. They consist of two file types, .RAW and .SDT, and are typically located in the ..\audio folder in the game directory. Similar to an IMG archive, the .SDT file is a binary file containing the directory and the .RAW contains the archive.

File format

SDT

GTA 2

Each entry in the SDT file is 28 bytes in size:

4b - int - offset of audio file in sfx.raw
4b - int - size of audio file in bytes
4b - int - samples per sec, the speed of audio
4b - int - unknown
4b - int - loop start, where looping would begin relative to audio file's position, 0 for beginning of audio file
4b - int - loop end, where looping would end relative to audio file's position, -1 for end of audio file

GTA III and Vice City

Each entry in the SDT file is 24 bytes in size:

4b - int - offset of audio file in sfx.raw
4b - int - size of audio file in bytes
4b - int - samples per sec, the speed of audio
4b - int - loop start, where looping would begin relative to audio file's position, 0 for beginning of audio file
4b - int - loop end, where looping would end relative to audio file's position, -1 for end of audio file

RAW

The RAW file contains raw WAV files. Headers must be added for use in standard audio players when extracted. The following is the standard header in terms of the SDT format.

Offset Type Identifier Description
0x00 char[4] ChunkID "RIFF"
0x04 dword ChunkSize size from SDT format + 36
0x08 char[4] Format "WAVE"
0x0C char[4] Subchunk1ID "fmt "
0x10 dword SubchunkSize 16
0x14 word AudioFormat 1 (PCM)
0x16 word NumChannels 1 (mono)
0x18 dword SampleRate sample rate from SDT format
0x1C dword ByteRate sample rate from SDT format * 2
0x20 word BlockAlign 2
0x22 word BitsPerSample 16
0x24 char[4] Subchunk2ID "data"
0x28 dword Sunchunk2Size size from SDT format
0x2C - Data raw SFX data

SFX files content

GTA III

Vice City

Tools

See also

External links

v · d · e
Vice City Grand Theft Auto: Vice City
File Formats.adf.b.col.cfg.dff.dat.gxt.ide.ifp.img/.dir.ipl.raw/.sdt.rep.scm.txd
DocumentationAudioHandlingMap ListingOpcodesScript PathsSavesSound EffectsStatisticsVehicles
ToolsCLEOCollision File Editor IIG-ToolsGXT EditorIMG ToolLimit AdjusterKEd (map editor)Sanny BuilderTXD Workshop
TutorialsHow to create a missionHow to create a threadVehicle Mod Installation
MultiplayerGTA:LC MultiplayergtaTournamentMulti Theft AutoState Of Liberty OnlineVice City MultiplayerVice City Online
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comModding VC Mobile versionOpcodes database
v · d · e
GTA III Grand Theft Auto III
File Formats.b.col.cfg.dff.dat.gxt.ide.ifp.img.ipl.raw/.sdt.scm.txd
DocumentationAudioHandling.cfgMap ListingOpcodesPathsSavesSound EffectsStatisticsVehicles
ToolsCLEOCollision File Editor IIG-ToolsIMG ToolMap EditorSanny BuilderTXD WorkshopWater Editor
TutorialsHow to create a missionHow to create a threadHow to use Map EditorVehicle Mod Installation
MultiplayerLiberty UnleashedMulti Theft AutoMore...
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comModding GTA 3 Mobile versionOpcodes database