You are viewing a potentially older version of this package. View all versions.
Tchernobill-Audio_Formats-1.0.0 icon

Audio Formats

Lets SideLoader load .ogg and .mp3 files, like it already loads .wav

Date uploaded a day ago
Version 1.0.0
Download link Tchernobill-Audio_Formats-1.0.0.zip
Downloads 2
Dependency string Tchernobill-Audio_Formats-1.0.0

This mod requires the following mods to function

sinai-dev-SideLoader-3.8.4 icon
sinai-dev-SideLoader

API and Mod Development Toolkit for Outward.

Preferred version: 3.8.4
BepInEx-BepInExPack_Outward-5.4.8 icon
BepInEx-BepInExPack_Outward

BepInEx pack for Outward.

Preferred version: 5.4.8

README

Features

Framework mod: everywhere SideLoader accepts a .wav file, it now also accepts .ogg and .mp3.

Nothing to configure, nothing to call. Install it, and the audio files of any SideLoader pack are picked up whatever their format.

Details

As a mod builder, drop your .ogg / .mp3 files in Sideloader\<YourPack>\AudioClip\ exactly like you would drop .wav files, and add this mod as a dependency. The file name (without its extension) stays the clip key, so an existing pack keeps working after converting its files.

This covers:

  • the AudioClip\ folder of a SideLoader pack (folder, .zip archive or asset bundle),
  • CustomAudio.LoadAudioClip(filePath, ...) and CustomAudio.LoadAudioClip(byte[], ...),
  • CustomAudio.ConvertByteArrayToAudioClip(byte[], ...),
  • replacing a vanilla GlobalAudioManager.Sounds entry, by naming the file after it.

Ogg and mp3 are compressed formats, so unlike .wav a long track stays small on disk.

Prefer ogg. At the bitrates that matter for voice or short effects it is smaller than mp3 for the same fidelity, and it decodes sample-exact. Mp3 keeps the encoder's padding: a clip comes out about 110 ms longer in game than its source, which the engine does not trim.

Decoding

Files are decoded by the game engine itself, which is fast and needs nothing extra. If the engine refuses a file, the mod retries with the bundled fully managed decoders (NVorbis for ogg, under Ms-PL, and NLayer for mp3, under MIT - both redistributed unmodified, see THIRD-PARTY-NOTICES.md). That fallback is what makes mp3 dependable, since the engine's mp3 support is picky about tags and unusual bitrates, and it is also what reads audio stored inside a .zip pack, where the engine has no file to work from.

PreferManagedDecoders (via Outward Configuration Manager: F5) forces the managed decoders for every file, should a file play everywhere except in game. VerboseLogging reports the sample rate, channel count and decoder used for each clip in output_log.txt.

CHANGELOG

Update 1.0.1

Reupload as v0 hanged on Thunderstore.

Update 1.0.0

Initial version. SideLoader now loads .ogg and .mp3 files wherever it loads .wav files: the AudioClip\ folder of any pack (folder, .zip archive or asset bundle), the CustomAudio API, and vanilla sound replacement through GlobalAudioManager.Sounds. An existing pack keeps working after converting its files - the file name without its extension is still the clip key.