Skip to content

Repository files navigation

A low-level audio plugin for Flutter.

Pub Versionstyle: very good analysis

LinuxWindowsAndroidMacOSiOSWeb
Support💙💙💙💙💙💙
Minimum VersionAnyAny21+10.15+13.0+iOS 16.4+
Safari 16.4+
Chrome 91+
Edge 91+
Firefox 89+

Overview

A high-performance audio plugin designed primarily for games and immersive applications, providing low latency and advanced features.

Key Features

  • ⚡ Low latency, high performance audio
  • ⏱️ Sample-accurate scheduled playback: playClocked for sub-millisecond spaced playback regardless of buffer size, and playScheduled for score/manifest-style scheduling of whole batches of sounds on the engine's own clock (with optional scheduled stop/fade). Perfect for metronomes, music sequencers, rhythm games and precisely timed audio cues
  • 🎮 3D positional audio with Doppler effect
  • 🔄 Gapless looping with half-open [start, end) loop regions
  • 🔄 Stream audio with auto-pause for buffering, support for PCM, MP3, WAV, Ogg with Opus, Vorbis and FLAC containers
  • 📥 Pull-buffer streaming: the engine requests encoded data on demand (MP3, WAV, FLAC, Ogg Opus/Vorbis/FLAC), with seek support and callbacks for buffering, metadata, duration and data requests — ideal for network streams and custom data sources
  • 🚌 Mixing buses: group voices (music, SFX, UI...) into sub-mixes with their own volume, filters and visualization
  • 📊 Get audio wave and/or FFT audio data in real-time (useful for visualization)
  • 🎛️ Rich effects system (reverb, echo, limiter, parametric equalizer, pitch shift, etc.)
  • ⚙️ Faders for attributes (e.g. fade out for 2 seconds, then stop)
  • 🎚️ Oscillators for attributes
  • 🌊 Waveform generation and visualization
  • 🔊 Multiple voices, playing different or even the same sound multiple times
  • 🎵 Support for MP3, WAV, OGG, and FLAC
  • 🔴 Capture the master mixer output as a stream for recording, processing, or streaming (with different PCM formats and Opus, Vorbis, FLAC, WAV encoded stream formats)
  • ⏱️ Read audio data samples from a file with a given time range
  • 🌊 Generate waveforms in real-time with various types (sine, square, saw, triangle, etc.)

Getting Started

If you are looking for a package to visualize audio using shaders or CustomPainter, please check out audio_flux. It uses this plugin for output and flutter_recorder for input.

Also, if you are building using Swift Package Manager (SPM), please check out iOS and MacOS Configuration.

Documentation

Simple Example

voidexample() async {
final soloud =SoLoud.instance;
await soloud.init();
await soloud.playSource(asset:'assets/sound.mp3');
// orfinal sound =await soloud.loadAsset('assets/sound.mp3');
final handle = soloud.play(sound);
[...]
await soloud.deinit();
}

Apps & Games Using flutter_soloud

A showcase of apps and games built with this plugin:

App/GameDeveloperDescription
GPhil
webmacOSWindows
Vyacheslav GryaznovInnovative app designed for musicians to play instrumental concertos with flexible virtual orchestral accompaniment.
ForcebarDoug ToddForcebar is a pure reflex game.
RadioVisualizerMarco BavagnoliStream over 35,000 live radio stations from every corner of the globe.
Stellar Bastion
webAndroidiOS
Coconut Island Apps2D Tower Defense game.
Mortigen
webAndroidiOS
Luis Enrique RuizRoguelite survival shooter.
SUMOJI
webAndroidiOS
Valentin MartinetFun Emoji-based Sudoku.

Want to add your app? Feel free to open a PR!

License

The Dart plugin is covered by the MIT license. For information about the underlying SoLoud engine license, see the documentation.

About

Flutter low-level audio plugin using SoLoud C++ library and FFI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages