EmbeddedAudioSource

Represents a source of audio data that can be embedded inside a SoundAnnotation.

Constructors

Link copied to clipboard
constructor(@NonNull audioDataProvider: DataProvider, @NonNull audioEncoding: AudioEncoding, @IntRange(from = 1) sampleRate: Int, @IntRange(from = 8) sampleSize: Int, @IntRange(from = 1) channels: Int, @Nullable description: String)
Constructs an embedded audio source with data served from a DataProvider.
constructor(@NonNull audioData: Array<Byte>, @NonNull audioEncoding: AudioEncoding, @IntRange(from = 1) sampleRate: Int, @IntRange(from = 8) sampleSize: Int, @IntRange(from = 1) channels: Int, @Nullable description: String)
Constructs an embedded audio source with data served from memory.

Properties

Link copied to clipboard
The encoding format of the audio samples.
Link copied to clipboard
The number of audio channels.
Link copied to clipboard
Provider for the raw audio data.
Link copied to clipboard
Constant value returned from getDuration to signal an error during retrieval of the actual audio clip duration.
Link copied to clipboard
The sampling rate in samples per second (Hz).
Link copied to clipboard
The number of bits per sample value per channel.

Functions

Link copied to clipboard
Returns audio data description.
Link copied to clipboard
open fun getDuration(): Long
Audio duration in millisecond.