flutter_soloud library

Flutter low level audio plugin using SoLoud library and FFI

Classes

AudioData
Class to manage audio samples.
AudioSource
A representation of an audio source: something that can be played.
PlaybackDevice
CaptureDevice exposed to Dart.
SoLoud
The main class to call all the audio methods that play sounds.
SoLoudTools
The SoloudTools class provides static methods to load audio files from various sources, including assets, local files, and URLs.

Enums

BufferingType
How the buffering should work when using the BufferStream.
BufferType
The PCM types.
Channels
The channels to be used while initializing the player.
FilterType
The different types of audio filters.
GetSamplesKind
The way the audio data should be acquired.
LoadMode
The way an audio file is loaded.
ReadSamplesErrors
Possible read samples errors.
SoundEventType
sound event types
WaveForm
The types of waveforms.

Extension Types

SoundHandle
A handle for a sound that is currently playing.
SoundHash
A hash of an AudioSource instance.

Typedefs

StreamSoundEvent = ({SoundEventType event, SoundHandle handle, AudioSource sound})
the type sent back to the user when a sound event occurs

Exceptions / Errors

SoLoudBackendNotInitedException
An exception that is thrown when SoLoud (C++) backend is not initialized.
SoLoudBufferStreamCanBePlayedOnlyOnceCppException
The buffer stream can be played only once when using release buffer type.
SoLoudCppException
A base class for all SoLoud exceptions that are thrown from the C++ side.
SoLoudCreateVoiceGroupDartException
An exception that is thrown when SoLoud (Dart) tries to create a voice group but something gone wrong.
SoLoudDartException
A base class for all SoLoud exceptions that are thrown from the Dart side.
SoLoudDllNotFoundException
An exception that is thrown when the SoLoud (C++) dynamic library (.dll, .so, .dylib) was not found.
SoLoudException
A base class for all SoLoud exceptions.
SoLoudFailedToCreateOpusDecoderCppException
An error occurred while creating an Opus decoder.
SoLoudFailedToDecodeOpusPacketCppException
An error occurred while decoding Opus data. This could happen when the data is corrupted.
SoLoudFileLoadFailedException
An exception that is thrown when SoLoud (C++) could find but can't load the file.
SoLoudFileNotFoundException
An exception that is thrown when SoLoud (C++) can't find the file.
SoLoudFilterAlreadyAddedException
An exception that is thrown when SoLoud (C++) cannot add a filter that has already been added.
SoLoudFilterForSingleSoundOnWebDartException
An exception that is thrown when trying to set a filter for a single AudioSource on the Web platform.
SoLoudFilterNotFoundException
An exception that is thrown when SoLoud (C++) is asked to use a filter that is not found.
SoLoudFilterParameterGetErrorCppException
An error occurred while getting a filter parameter.
SoLoudHashIsNotABufferStreamCppException
An error occurred when asking to add audio data to an AudioSource that is not a buffer stream.
SoLoudInitializationStoppedByDeinitException
An exception that is thrown when the SoLoud engine initialization is cut short by a call to SoLoud.deinit().
SoLoudInitializationTimedOutException
An exception that is thrown when the SoLoud engine initialization times out.
SoLoudInvalidParameterException
An exception that is thrown when an invalid parameter was passed to SoLoud (C++).
SoLoudIsolateSpawnFailedException
An exception that is thrown when the SoLoud isolate fails to spawn.
SoLoudMaxFilterNumberReachedException
An exception that is thrown when SoLoud (C++) cannot add another filter. The max number of concurrent filter is set to 8.
SoLoudNetworkStatusCodeException
An exception that is thrown when the network request returns a non-200 status code.
SoLoudNoPlaybackDevicesFoundCppException
An error occurred when reading PCM frames.
SoLoudNotImplementedException
An exception that is thrown when a SoLoud (C++) feature is being used that is not implemented in this package.
SoLoudNotInitializedException
An exception that is thrown when a SoLoud method is accessed before the engine is initialized (by calling SoLoud.initialize() and either awaiting that method call, or awaiting the SoLoud.initialized Future elsewhere, or by checking the synchronous SoLoud.isInitialized bool).
SoLoudNullPointerException
An exception that is thrown when SoLoud (C++) experiences a null pointer exception.
SoLoudOpusOggLibsNotAvailableException
An exception that is thrown when at buit-time the Opus and Ogg libraries are not available and trying to use the Opus codec.
SoLoudOutOfMemoryException
An exception that is thrown when SoLoud (C++) runs out of memory.
SoLoudPcmBufferFullCppException
Trying to add PCM data but the stream is marked to be ended already by the user or when the stream reached its maximum capacity, in this case the stream is automatically marked to be ended.
SoLoudPlayerAlreadyInitializedException
An exception that is thrown when SoLoud (C++) cannot add a filter that has already been added.
SoLoudReadSamplesFailedToGetDataFormatCppException
An error occurred while reading the decoder data format.
SoLoudReadSamplesFailedToReadPcmFramesCppException
An error occurred when reading PCM frames.
SoLoudReadSamplesFailedToSeekPcmCppException
An error occurred when seeking audio data.
SoLoudReadSamplesNoBackendCppException
An error occurred while initializing the backend to read samples.
SoLoudSoundHandleNotFoundCppException
An exception that is thrown when SoLoud (C++) receives a handle that is not found. This could happen when trying to use the given handle to get/set some of its attributes (like setting handle volume) after the handle has been stopped/ended and hence it becomes invalid.
SoLoudSoundHashNotFoundCppException
An exception that is thrown when SoLoud (C++) receives a sound hash that is not found.
SoLoudSoundHashNotFoundDartException
An exception that is thrown when SoLoud (Dart) receives a sound hash that is not found.
SoLoudStreamEndedAlreadyCppException
Trying to add PCM data but the stream is marked to be ended already, by the user or when the stream reached its maximum capacity, in this case the stream is automatically marked to be ended.
SoLoudTemporaryFolderFailedException
An exception that is thrown when the temporary folder fails to be created or opened.
SoLoudUnknownErrorException
An exception that is thrown when an unknown error occurred in SoLoud (C++).
SoLoudVisualizationNotEnabledException
An exception that is thrown when SoLoud (C++) cannot process a command (asking for audio data) because the visualization is not enabled.
SoLoudWrongOpusParamsException
An exception that is thrown when setting the wrong Opus parameters.