Interface Source
access this type via: io.audio.Source (provides, requires or uses)
--- semantic variants: raw, wav, mp3, flac, ogg
An audio source object, which stores the encoded data of some piece of audio. The audio is decoded during playback.
Functions
Source(byte content[], optional storeFormat f)
int getLength()
Source(byte content[], optional storeFormat f)
Initialise the audio source using the given data (e.g., MP3 data read from a file, by reading all bytes of the file into memory and passing them into this function as content). The audio format parameter can be null to use a default format, except for the 'raw' source variant where the format must specify what format is contained in the given audio content.
int getLength()
Get the length of the audio stream, in audio frames.