Skip to content

Create std.dmaudio for III/VC audios#135

Open
CookiePLMonster wants to merge 3 commits intothelink2012:masterfrom
CookiePLMonster:dmaudio-stuff
Open

Create std.dmaudio for III/VC audios#135
CookiePLMonster wants to merge 3 commits intothelink2012:masterfrom
CookiePLMonster:dmaudio-stuff

Conversation

@CookiePLMonster
Copy link
Copy Markdown
Contributor

@CookiePLMonster CookiePLMonster commented Apr 27, 2026

This PR adds a new std.dmaudio plugin for GTA III and Vice City. It adds support for:

  • Overriding sfx.raw/sfx.sdt. No partial replacements because all audios are referenced from there by ID, so there is no way to meaningfully have multiple mods add files to the archives. No hot-reload, because sfx.raw is always open and the game doesn't even have any code to close that file.
  • Overriding audio samples from the audio directory, incl. new samples if the game makes use of them. Supports wav, mp3, adf (for Vice City) and vb (for mods like VBdec). Hot-reload is supported.
10_gta3_qnwadGt9Uw.mp4

Fixes #134
Fixes #101

@CookiePLMonster CookiePLMonster marked this pull request as draft April 27, 2026 23:26
sfx.raw is permanently opened by the game,
so any attempts to reinstall are pointless.

Loose files cannot be loaded at the moment,
but they are likely theoretically possible for replacements.
Loose addon SFX files are meaningfless, as the game
accesses them exclusively through an ID enum,
and thus there is no way to make sure new sounds
sit where mods expect them to.
@CookiePLMonster CookiePLMonster marked this pull request as ready for review April 28, 2026 13:26
@CookiePLMonster
Copy link
Copy Markdown
Contributor Author

Switched to a multimap and added path suffix matching, so identical file names located in different subdirectories can work.

Imagine a theoretical (but possible with custom audio samples installed) case where the game has:

AUDIO\FOO\FILE.WAV
AUDIO\BAR\FILE.WAV

and we have a mod overriding one of those in modloader\modname\bar\file.wav. Paths will then be compared component-wise and the second file will be selected, as it's "closer".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{GTA III] Doesn't work with audio files One question

1 participant