Fmod5Sharp 1.0.1
See the version list below for details.
dotnet add package Fmod5Sharp --version 1.0.1
NuGet\Install-Package Fmod5Sharp -Version 1.0.1
<PackageReference Include="Fmod5Sharp" Version="1.0.1" />
paket add Fmod5Sharp --version 1.0.1
#r "nuget: Fmod5Sharp, 1.0.1"
// Install Fmod5Sharp as a Cake Addin #addin nuget:?package=Fmod5Sharp&version=1.0.1 // Install Fmod5Sharp as a Cake Tool #tool nuget:?package=Fmod5Sharp&version=1.0.1
Fmod5Sharp
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 ogg files (assuming the contained data is vorbis-encoded).
Support for more encodings can be added as requested.
Notice (Additional Dependencies)
In order to restore ogg files from the Fmod sample data, this library uses libopus and libvorbis.
These are not provided, and must be installed separately or shipped with your application.
If on windows, they should be named opus.dll
and vorbis.dll
.
On other platforms, installing libopus or libvorbis should be sufficient, but I haven't tested this.
Regardless, the architecture of the native assemblies must match that of your application, or you will get a BadImageFormatException
thrown by the system.
Usage
The Fmod file can be read like this
FmodSoundBank bank = FsbLoader.LoadFsbFromByteArray(rawData);
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].Channels; //2 for stereo, 1 for mono.
And, you can convert the audio data back to a standard format.
For example if bank.Header.AudioType == FmodAudioType.VORBIS
:
var oggFileBytes = FmodVorbisRebuilder.RebuildOggFile(samples[0]);
//Now you can save oggFileBytes to an .ogg file 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.
If the user's system does not have libopus or libvorbis, this will throw a DllNotFoundException
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- OggVorbisSharp (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Fmod5Sharp:
Repository | Stars |
---|---|
AssetRipper/AssetRipper
GUI Application to work with engine assets, asset bundles, and serialized files
|
|
nesrak1/UABEA
c# uabe for newer versions of unity
|