ziggurat_sounds library

Add sound support to ziggurat.

To use this package, you will need a Game instance:

final game = Game('Ziggurat Sounds');

The game will emit sound events. These events must be handled by a SoundManager

final soundManager = SoundManager(synthizerContext);

By default, the sound manager has no sounds loaded. For that, you need an instance of BufferStore:

final bufferStore = BufferStore(random, synthizer);

Add the buffer store to the sound manager:

soundManager.bufferStores.add(bufferStore);

Now you can add sounds to the buffer store using the methods on that class.

If you are using the ziggurat_utils package, you can create buffer stores from encrypted assets using the vault command.

Classes

AssetReferenceReference
A class to hold an AssetReference, as well as other meta data required to generate Dart code.
AssetStore
A class for storing references to assets.
AudioChannel
A channel to play sounds through.
BufferCache
A class to get and hold buffers.
BufferStore
A class for storing Buffer instances.
DataFile
A class which holds a list of DataFileEntry instances.
DataFileEntry
An entry in a DataFile instance.
Reverb
A reverb object.
SoundManager
The sound manager class.
VaultFile
A collection of files and folders stored as strings.
VaultFileStub
A class for making VaultFile instances, and writing Dart code.

Extensions

MakeGlobalFdnReverb on ReverbPreset
An extension for creating a GlobalFdnReverb instance from a ReverbPreset instance.

Exceptions / Errors

DuplicateEntryError
A duplicate entry was added to a BufferStore instance.
NoSuchBufferError
No such buffer was found in a BufferStore instance.
NoSuchChannelError
No such channel was found.
NoSuchReverbError
No such reverb was found.
NoSuchSoundError
No such sound was found.
NoSuchWaveError
No such wave was found.
ZigguratSoundsError
The base class for all errors in this package.