TuningFork is a library for libGDX that provides advanced audio features. The goal was to make most of the features of OpenAL Soft accessible and provide a comfortable, easy to use, low overhead and object oriented high-level API. In addition, the library offers some convenience features that are needed for most games, such as the music player.
Note that TuningFork is not an extension to libGDX audio but a replacement.
- Spatial 3D and 2D audio
- Directional audio (3D)
- Real-time effects such as Reverb, Echo, Flanger, Distortion (and many more)
- Loop-points
- Filters
- HRTF
- Music player with support for playlists and fading
- Streaming is handled on a background thread
- AssetManager integration
- Play raw PCM data
- Record audio
This library widens the range of supported audio formats compared to libGDX, such as 8-Bit / 24-Bit / 32-Bit wav's, IMA and MS ADPCM, surround sound, just to name a few. Here's the full list.
- wav
- ogg
- mp3
- flac
- aiff
- qoa
- Desktop only
I didn't want to make any compromises by finding the lowest common denominator between platforms and instead give access to the full feature-set of OpenAL Soft + more.
Add TuningFork as a dependency to your project (I recommend to add it in the core project if you develop for desktop only):
implementation 'com.github.Hangman:TuningFork:4.3.0'
Java 8 is required, make sure to set sourceCompatibility = JavaLanguageVersion.of(8)
(or higher) in your gradle scripts.
Version of libGDX | Latest compatible version of TuningFork |
---|---|
1.12.1 | 4.3.0 |
1.12.0 | 4.1.0 |
1.9.12 - 1.11.0 | 3.3.0 |
1.9.11 | 2.0.1 |
< 1.9.11 | not supported, might work though: 2.0.1 |
This library follows semantic versioning. Breaking changes are indicated by a major version increase.
You can find the release notes here.
The wiki should provide all the information you need to get started quickly. If something is missing, please open an issue.
Link to the Wiki!
To build the library from source, you need a JDK >= 8 installed. You can grab one here: Liberica JDK.
TuningFork uses Gradle as it's build tool (you don't need to have Gradle installed).
This will compile the library. The resulting jar can be found under core/build/libs/
.
./gradlew build
This will publish the core artifact to your local Maven repository.
./gradlew publishToMavenLocal