An audio subsystem replacement for FNA.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cosmonaut 37948ce79f fix audio not being disposed in correct order 2 months ago
src fix audio not being disposed in correct order 2 months ago
.gitignore add FNA dependency 2 months ago
FineAudio.Core.csproj add FNA dependency 2 months ago
FineAudio.csproj add FNA dependency 2 months ago
LICENSE README and LICENSE 2 months ago
README.md fix typo 2 months ago

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. Supported formats are WAV for static audio and OGG for streaming audio. You can also add your own streaming format support by inheriting the StreamingSound class and implementing the AddBuffer method.

Usage

Create the AudioDevice:

AudioDevice = new FineAudio.AudioDevice();

Load your sound effects and music:

StaticSound.Load(AudioDevice, "sword.wav");
StreamingSoundOgg.Load(AudioDevice, "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(AudioDevice, "sword.wav");
var swordSoundInstance = swordSound.GetInstance();
swordSoundInstance.Play();

MySong = StreamingSoundOgg.Load(AudioDevice, "my_song.ogg");
MySong.Seek(6f); // seek to 6 seconds
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.