SamboyCoding/Fmod5Sharp
SamboyCoding/Fmod5Sharp has 49 GitHub stars and 18 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-09 16:58 UTC. Last push 2026-07-13.
Managed-Only C# Library for Decoding FMOD 5 sound banks (FSB or bank files)
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalFmod5Sharp
Managed decoder for FMOD 5 sound banks (FSB files).
This library allows you to read FMOD 5 sound bank files (they start with the characters FSB5) into their contained samples, and then export those samples to standard file formats (assuming the contained data format is supported).
Support for more encodings can be added as requested.
Usage
The Fmod file can be read like this
//Will throw if the bank is not valid.
FmodSoundBank bank = FsbLoader.LoadFsbFromByteArray(rawData);
Or if you don't want it to throw if the file is invalid, you can use
bool success = FsbLoader.TryLoadFsbFromByteArray(rawData, out FmodSoundBank bank);
You can then query some properties about the bank:
FmodAudioType type = bank.Header.AudioType;
uint fmodSubVersion = bank.Header.Version; //0 or 1 have been observed
And get the samples stored inside it:
List<FmodSample> samples = bank.Samples;
int frequency = samples[0].Metadata.Frequency; //E.g. 44100
uint numChannels = samples[0].Metadata.Channels; //2 for stereo, 1 for mono.
string name = samples[0].Name; //Null if not present in the bank file (which is usually the case).
And, you can convert the audio data back to a standard format.
var success = samples[0].RebuildAsStandardFileFormat(out var dataBytes, out var fileExtension);
//Assuming success == true, then this file format was supported and you should have some data and an extension (without the leading .).
//Now you can save dataBytes to an file with the given extension on your disk and play it using your favourite audio player.
//Or you can use any standard library to convert the byte array to a different format, if you so desire.
You can also check if a given format type is supported and, if so, what extension it will result in, like so:
bool isSupported = bank.Header.AudioType.IsSupported();
//Null if not supported
string? extension = bank.Header.AudioType.FileExtension();
Alternatively, you can consult the table below:
| Format | Supported? | Extension | Notes |
|---|---|---|---|
| PCM8 | ✔️ | wav | |
| PCM16 | ✔️ | wav | |
| PCM24 | ❌ | No games have ever been observed in the wild using this format. | |
| PCM32 | ✔️ | wav | Supported in theory. No games have ever been observed in the wild using this format. |
| PCMFLOAT | ❌ | Seen in at least one JRPG. | |
| GCADPCM | ✔️ | wav | Tested with single-channel files. Not tested with stereo, but should work in theory. Seen in Unity games. |
| IMAADPCM | ✔️ | wav | Seen in Unity games. |
| VAG | ❌ | No games have ever been observed in the wild using this format. | |
| HEVAG | ❌ | Very rarely used - only example I know of is a game for the PS Vita. | |
| XMA | ❌ | Mostly used on Xbox 360. | |
| MPEG | ❌ | Used in some older games. | |
| CELT | ❌ | Used in some older indie games. | |
| AT9 | ❌ | Native format for PlayStation Audio, including in Unity games. | |
| XWMA | ❌ | No games have ever been observed in the wild using this format. | |
| VORBIS | ✔️ | ogg | Very commonly used in Unity games. |
| FADPCM | ✔️ | wav | Seems to be used in Unreal Engine games. |
| OPUS | ❌ | ? |
Acknowledgements
This project uses:
- OggVorbisEncoder to build Ogg Vorbis output streams.
- NAudio.Core to do the same thing but for WAV files.
- BitStreams for parsing vorbis header data.
- IndexRange to make my life easier when supporting .NET Standard 2.0.
It also uses System.Text.Json.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,500 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,396 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,840 starsmrdoob/three.js
JavaScript 3D Library.
117,983 stars