An audio subsystem replacement for FNA.
Go to file
cosmonaut d0b26f2898 README and LICENSE 2022-04-20 14:12:09 -07:00
src add FNA dependency 2022-04-20 13:53:53 -07:00
.gitignore add FNA dependency 2022-04-20 13:53:53 -07:00
FineAudio.Core.csproj add FNA dependency 2022-04-20 13:53:53 -07:00
FineAudio.csproj add FNA dependency 2022-04-20 13:53:53 -07:00
LICENSE README and LICENSE 2022-04-20 14:12:09 -07:00
README.md README and LICENSE 2022-04-20 14:12:09 -07:00

README.md

This is FineAudio, a replacement for FNA's Audio subsystem.

About FineAudio

FineAudio is basically MoonWorks Audio with an FNA dependency. It intends to deal with some of the missing pieces of XNA audio and make it easier to use.

Usage

Create the AudioDevice:

AudioDevice = new FineAudio.AudioDevice();

Load your sound effects and music:

StaticSound.Load(AudioSystem, "sword.wav");
StreamingSoundOgg.Load(AudioSystem, "my_song.ogg");

Sound playback is controlled via sound instances. Streaming sounds are already instances, but static sounds need to have instances created from them.

var swordSound = StaticSound.LoadWav(AudioSystem, "sword.wav");
var swordSoundInstance = swordSound.GetInstance();
swordSoundInstance.Play();

MySong = StreamingSoundOgg.Load(AudioSystem, "my_song.ogg");
MySong.Play();

You are responsible for managing these instances! If you lose track of sound instances, unpredictable things will happen, like sudden interruption of playback or memory leaks.

License

FineAudio is licensed under the zlib license. See LICENSE for details.