20 releases (13 breaking)

0.14.0 Jul 21, 2020
0.12.0 Mar 5, 2020
0.5.0 Dec 30, 2019
0.2.2 Nov 18, 2019

#64 in Audio

Download history 123/week @ 2020-04-11 23/week @ 2020-04-18 6/week @ 2020-04-25 8/week @ 2020-05-02 2/week @ 2020-05-09 58/week @ 2020-05-16 26/week @ 2020-05-23 40/week @ 2020-05-30 22/week @ 2020-06-06 14/week @ 2020-06-20 20/week @ 2020-06-27 20/week @ 2020-07-04 40/week @ 2020-07-11 37/week @ 2020-07-18 11/week @ 2020-07-25

92 downloads per month
Used in rg3d

MIT license



Sound library for games and interactive applications written in Rust.

Key features

  • Generic and Spatial sound sources.
  • Built-in streaming for large sounds.
  • Raw samples playback support.
  • WAV format support (non-compressed).
  • Vorbis/ogg support (using lewton).
  • HRTF support for excellent positioning and binaural effects.
  • Reberb effect.


Examples can be found in ./examples. Make sure you run examples with --release flag, debug version is very slow and may cause tearing of output sound.

Supported OS

  • Windows (DirectSound)
  • Linux (alsa)

How to build

Add rg3d-sound = "0.11.0" to your Cargo.toml. Supported Rust version is >= 1.38.


Library has full HRTF support, it uses HRIR spheres generated using IRCAM HRIR database. HRIR spheres are produced using small tool written in C++ - hrir_sphere_builder. It is very important to find HRTF that suits you because they're very individual and overall perception fully defined by use of correct HRTF.


Any contributions are very appreciated! Check Issues page to see how can you help project.




This library wouldn't have been ever created without work of these people. Thank you all!

  1. Digital signal processing and filters
  2. Physical Audio Signal Processing
  3. Hannes Gamper, "Head-related transfer function interpolation in azimuth, elevation, and distance", The Journal of the Acoustical Society of America 134, EL547 (2013); doi: 10.1121/1.4828983
  4. Fábio P. Freeland, Luiz W. P. Biscainho, Paulo S. R. Diniz, "Interpolation of Head-related transfer function (HRTFS): A Multi-source approarch"
  5. IRCAM Head-related impulse response database
  6. Reverb
  7. Overlap-add convolution - not used anymore due to significant distortions at segment boundary when impulse response changes.
  8. Overlap-save convolution - works much better when impulse response changes, there are only phase shift issues which are more less acceptable.
  9. OpenAL Specification - distance models and general design considerations.
  10. http://csoundjournal.com/issue9/newHRTFOpcodes.html - some ideas to remove clicks in hrtf renderer
  11. https://phaidra.kug.ac.at/open/o:11024