/HezAudio

Hezaerd's audio Library

Primary LanguageC++Apache License 2.0Apache-2.0

HezAudio

Hezaerd Audio is an audio library wich take place in my collection of libraries that I made for my own projects , built on top of OpenAL Soft. I've never written an audio library before so I figured I'd give it a shot, since I want a library that's easy to use and has a simple API. I'm not sure if I'll ever finish it, but I'll try my best.

Build status

premake-setup

Currently support

  • Formats : .ogg & .mp3
  • 3D spatial playback

TODO

  • Add support for more formats (.wav in priority)
  • Unload audio sources from memory
  • Stream audio files (for working play/pause/stop)
  • Listener positioning API
  • Effects ??

Exemple

Check out the demo project for more, but it's super simple to use.

// Init the audio engine - bool is for debug mode
Hez::Audio::Audio::Init(true);
// Load audio source from file - bool is for whether the
// source should be in 3D space or not
auto source = Hez::Audio::Audio::LoadAudioSource("Assets/effect.ogg", true);
// Play the audio source
Hez::Audio::Audio::Play(source);

and you can set various properties on the audio source as well:

source.SetPosition(x, y, z);
source.SetGain(2.0f);
source.SetPitch(1.2f);
source.SetLooping(true);

Dependencies