# AudioFileSource

class AudioFileSource(context: Context, path: Uri, loopMode: Boolean = true, onFinish: (isLoop: Boolean) -> Unit = {}) : AudioSource

Created by pedro on 12/1/24.

## Constructors

AudioFileSource
Link copied to clipboard
constructor(context: Context, path: Uri, loopMode: Boolean = true, onFinish: (isLoop: Boolean) -> Unit = {})

## Properties

created
Link copied to clipboard
var created: Boolean
echoCanceler
Link copied to clipboard
var echoCanceler: Boolean
isStereo
Link copied to clipboard
var isStereo: Boolean
noiseSuppressor
Link copied to clipboard
var noiseSuppressor: Boolean
sampleRate
Link copied to clipboard
var sampleRate: Int

## Functions

getDuration
Link copied to clipboard
fun getDuration(): Double
getTime
Link copied to clipboard
fun getTime(): Double
init
Link copied to clipboard
fun init(sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
isAudioDeviceEnabled
Link copied to clipboard
fun isAudioDeviceEnabled(): Boolean
isMuted
Link copied to clipboard
fun isMuted(): Boolean
isRunning
Link copied to clipboard
open override fun isRunning(): Boolean
moveTo
Link copied to clipboard
fun moveTo(time: Double)
mute
Link copied to clipboard
fun mute()
playAudioDevice
Link copied to clipboard
fun playAudioDevice()
release
Link copied to clipboard
open override fun release()
replaceFile
Link copied to clipboard
fun replaceFile(context: Context, uri: Uri)
setCodecErrorCallback
Link copied to clipboard
fun setCodecErrorCallback(codecErrorCallback: CodecErrorCallback?)
setExtractor
Link copied to clipboard
fun setExtractor(extractor: Extractor)
setLoopMode
Link copied to clipboard
fun setLoopMode(enabled: Boolean)
start
Link copied to clipboard
open override fun start(getMicrophoneData: GetMicrophoneData)
stop
Link copied to clipboard
open override fun stop()
stopAudioDevice
Link copied to clipboard
fun stopAudioDevice()
unMute
Link copied to clipboard
fun unMute()