sys fmod-audio-sys

ffi bindings to FMOD and FMOD Studio

1 stable release

2.220.2 Jun 11, 2024
2.2.20 Jun 4, 2024

#490 in Audio


Used in fmod-oxide

MPL-2.0 license

45KB
700 lines

fmod-audio-sys

Low level bindgen wrappers for FMOD, like other -sys crates.

The library itself is licensed under MPLv2 and does not include FMOD's API! You will need to download FMOD yourself to make full use of this crate.

Currently named fmod-audio-sys both to distinguish itself as bindings for the FMOD audio engine and because fmod-sys is already taken :p

Usage

Add this crate as a dependency:

[dependencies]
fmod-audio-sys = "2.220.0"

You'll need to download and install FMOD's API. On Windows, all you need to do is run the installer- everything else is handled for you.

On other platforms, you'll need to place FMOD somewhere (usually your binary's root) and set FMOD_SYS_FMOD_DIRECTORY via .cargo/config.toml.


lib.rs:

Low level bindings to the FMOD sound engine.

Due to licensing restrictions, the FMOD API cannot be distributed with this crate. docs.rs documention is provided for the FMOD API but the actual API is not available without the FMOD library.

Currently, this crate provides both core and studio bindings (no fsbank bindings).

Configuration

In debug builds this crate will link against the logging version of the FMOD library. In release builds this crate will link against the release version of the FMOD library. You can force the debug version of the library by enabling the force-debug feature.

By default, this crate will search for an FMOD installation directory in the following places:

(On windows)

  • C:/Program Files (x86)/FMOD SoundSystem/FMOD Studio API Windows
  • D:/Program Files (x86)/FMOD SoundSystem/FMOD Studio API Windows
  • $OUT_DIR/FMOD Studio API Windows
  • $OUT_DIR/FMOD SoundSystem

(On all platforms)

  • $CARGO_MANIFEST_DIR/fmod
  • $OUT_DIR/fmod
  • $FMOD_SYS_FMOD_DIRECTORY

This installation is expected to follow the standard FMOD directory structure.

fmod:

  • api:
    • core:
      • inc
      • lib (contains architecture specific directories)
    • studio:
      • inc
      • lib (contains architecture specific directories)

Dependencies

~0.2–2.7MB
~55K SLoC