A binary Sound effect (*.sfx) container is actually three or four different file types that share the same extension, these files are heavily platform-dependent. They are used for level soundbanks, streamed sounds and music tracks.

Generally the audio data itself is ADPCM-encoded, so that it can be decoded by the embedded hardware.

  • IMA ADPCM with stereo channels interleaved: GameCube, PC (software decode).
  • Sony VAG: PlayStation 2.
  • Xbox ADPCM: Xbox.

All the following files were originally configured and exported using a custom GUI program called EuroSound that, unlike EuroLand, is no longer available, and the program itself is not useful because no source files were preserved.

An open-source replacement is currently being developed to mux and demux soundbanks into YAML and plain *.wav files.

Soundbanks Edit

Every level stores all of the used sound effects in its own sound bank, each sound effect has a series of flags and properties and contains a variable array of raw sound samples (PCM in PC, sometimes ADPCM-encoded in some sixth-generation consoles).

Soundbank files Edit

These are defined via hashcode in one of the last columns of X:\Sphinx\Grafix\Spreadsheets\LevelData.xls. Then, at runtime, when a level loads its corresponding .EDB files, also searches for that hashcode in X:\Sphinx\Binary\_bin_PC\_Eng\HCXXXXXX.sfx. Unprefixed, formatted in hexadecimal, by masking out the hashcode type section.

There are two exceptions that are hardcoded to try to load at game startup:

  • HC00FFFF.SFX (the single, special stream file; which has a different format).
  • HCFFFFFF.SFX (a special soundbank; the base/common/fallback soundbank?).

Stream file (HC00FFFF.SFX) Edit

Most of the long, streamed ambient sounds are actually stored here once instead of being duplicated in each soundbank, each soundbank references an index in the list of streamed sounds, the engine knows it is streamed because unlike most other internal indices, streamed ones are negative and seemingly stored in twos' complement.

It has a format very similar to a streamed music file, and there is only one file that is permanently kept loaded in memory. It's usually located in X:\Sphinx\Binary\_bin_PC\_Eng\HC00FFFF.SFX, but retrieved as ./_bin_PC/_Eng/HC00FFFF.SFX in the remastered port.

Sound details descriptor (SFX_Data.bin) Edit

Contains a special binary array, even if most of that data is redundant; but it probably exists to avoid having to load each soundbank just to get properties like the length of a sound. This table is generally kept resident in memory during the entire session. The corresponding data is available as a C-style header in the Sonix folder of the Authoring Tools. See SFX_Data.h.

Confusingly, it's stored in X:\Sphinx\Binary\_bin_PC\music\SFX_Data.bin when it doesn't have anything to do with music, but the EngineX programmers at Eurocom probably chose this because sounds are supposed to vary per language (and hence, loaded from a different folder) so they needed a static but common path to put this. Even if, in practice, only the English folder is actually in use; because there aren't voice overs in the final version, even when multi-language support was planned almost from the start.

Music track files Edit

These streamed files are loaded on demand from X:\Sphinx\Binary\_bin_PC\music\HCE?????.SFX. Each music track is defined via hashcode and stored in its own file. A music file usually contains a list of (also hashcode-defined) jump points and start points. Almost every track has a lead-in time, a middle looping section, and —occasionally— a small ending that is not generally used. These files always store ADPCM-encoded sound.

Community content is available under CC-BY-SA unless otherwise noted.