sounds_common library
Support for doing something awesome.
More dartdocs go here.
Classes
- AMPMParts
- AnsiColor
- Downloader
- Provides methods for downloading files.
- FileUtil
- Collection of useful methods for managing files.
- Format
- Log
- Logging class
- MediaFormat
- MediaFormatManager
-
Manages the list of supported MediaFormats.
This includes the list of Natively supported MediaFormats
as well any registered MediaFormat.
Native media formats are only available if the
sounds
package is installed andNativeMediaFormats.register()
has been called. - MediaProvider
- MyLogPrinter
- PlaybackDisposition
- Used to stream data about the position of the playback as playback proceeds.
- Track
- The Track class lets you define an audio track either from a path (uri) or a databuffer.
- UnknownMedia
Enums
- PlaybackDispositionState
- Indicates the current state of the Playback.
- TrackStorageType
- defines how the underlying audio media is stored.
Functions
-
black(
String text, {AnsiColor bgcolor = AnsiColor.white}) → String -
blue(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
cyan(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
green(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
grey(
String text, {double level = 0.5, AnsiColor bgcolor = AnsiColor.none}) → String -
magenta(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
noProgress(
PlaybackDisposition disposition) → void -
orange(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
prepareStream(
Track track, LoadingProgress progress) → Future -
red(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String - Returns a string wrapped with the selected ansi fg color codes.
-
setTrackDuration(
Track track, Duration duration) → void - Used by the SoundRecorder to update the duration of the track as the track is recorded into.
-
trackBuffer(
Track track) → Uint8List? - Returns the databuffer which holds the audio. If this Track was created via Track.fromBuffer.
-
trackRelease(
Track track) → void - globl functions to allow us to hide methods from the public api.
-
trackStoragePath(
Track track) → String - Returns the uri where this track is currently stored.
-
white(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String -
yellow(
String text, {AnsiColor bgcolor = AnsiColor.none}) → String
Typedefs
- LoadingProgress = void Function(PlaybackDisposition disposition)
-
Callback function used by internal methods indicate the loading progress.
The value of PlaybackDisposition.progress should be between
0.0 - 1.0
. If PlaybackDisposition.progress is complete its value MUST be 1.0. If loading has not yet commenced PlaybackDisposition.progress] value MUST be 1.0. - TrackAction = void Function(Track current)
Exceptions / Errors
- MediaFormatException
- Throw if an unsupported MediaFormat is passed. Different OS's support a different set of codecs.
- TrackPathException
- Exception throw in a file path passed to a Track isn't valid.