AudioManager

Manages the playback of audio output from files or TTS

Types

AudioRoute
Link copied to clipboard
annotation class AudioRoute
PCMDataOutputCallback
Link copied to clipboard
interface PCMDataOutputCallback
PlayStatus
Link copied to clipboard
annotation class PlayStatus
PlayStatusListener
Link copied to clipboard
interface PlayStatusListener : NativeMethodsReceiver.NativeListener
TTSOutputCallback
Link copied to clipboard
interface TTSOutputCallback

Functions

addPlayStatusListener
Link copied to clipboard
open fun addPlayStatusListener(listener: AudioManager.PlayStatusListener)
open fun addPlayStatusListener(listener: AudioManager.PlayStatusListener, @Nullable executor: Executor)
Adds a PlayStatus listener
clearQueue
Link copied to clipboard
open fun clearQueue()
Removes all output from the audio queue.
getAudioRoute
Link copied to clipboard
open fun getAudioRoute(): Int
onContextDestroy
Link copied to clipboard
open fun onContextDestroy()
playOutput
Link copied to clipboard
open fun playOutput(audioOutput: AudioOutput)
Plays audio output.
redirectPCMDataOutput
Link copied to clipboard
open fun redirectPCMDataOutput(callback: AudioManager.PCMDataOutputCallback)
Redirect the PCM data output to PCMDataOutputCallback Setting callback to null will reset audio output to normal
redirectTTSOutput
Link copied to clipboard
open fun redirectTTSOutput(callback: AudioManager.TTSOutputCallback)
Redirect the TTS text to TTSOutputCallback Setting callback to null will reset audio output to normal
removePlayStatusListener
Link copied to clipboard
open fun removePlayStatusListener(listener: AudioManager.PlayStatusListener)
setAudioRoute
Link copied to clipboard
open fun setAudioRoute(audioRoute: Int)
setHfpDelay
Link copied to clipboard
open fun setHfpDelay(hfpDelay: Int)
skipCurrentOutput
Link copied to clipboard
open fun skipCurrentOutput()
Skips the output at the front of the queue
stopOutputAndClearQueue
Link copied to clipboard
open fun stopOutputAndClearQueue()
Stops playing the current output immediately and clears any queued output