Audio Manager
Manages the playback of audio output from files or TTS
Types
Audio Route
Link copied to clipboard
PCMData Output Callback
Link copied to clipboard
interface PCMDataOutputCallback
Content copied to clipboard
Play Status
Link copied to clipboard
Play Status Listener
Link copied to clipboard
TTSOutput Callback
Link copied to clipboard
interface TTSOutputCallback
Content copied to clipboard
Functions
add Play Status Listener
Link copied to clipboard
open fun addPlayStatusListener(listener: AudioManager.PlayStatusListener)
Content copied to clipboard
open fun addPlayStatusListener(listener: AudioManager.PlayStatusListener, @Nullable executor: Executor)
Content copied to clipboard
Adds a PlayStatus listener
clear Queue
Link copied to clipboard
open fun clearQueue()
Content copied to clipboard
Removes all output from the audio queue.
get Audio Route
Link copied to clipboard
play Output
Link copied to clipboard
Plays audio output.
redirect PCMData Output
Link copied to clipboard
open fun redirectPCMDataOutput(callback: AudioManager.PCMDataOutputCallback)
Content copied to clipboard
Redirect the PCM data output to PCMDataOutputCallback Setting callback to null will reset audio output to normal
redirect TTSOutput
Link copied to clipboard
Redirect the TTS text to TTSOutputCallback Setting callback to null will reset audio output to normal
remove Play Status Listener
Link copied to clipboard
open fun removePlayStatusListener(listener: AudioManager.PlayStatusListener)
Content copied to clipboard
set Audio Route
Link copied to clipboard
set Hfp Delay
Link copied to clipboard
skip Current Output
Link copied to clipboard
open fun skipCurrentOutput()
Content copied to clipboard
Skips the output at the front of the queue
stop Output And Clear Queue
Link copied to clipboard
open fun stopOutputAndClearQueue()
Content copied to clipboard
Stops playing the current output immediately and clears any queued output