AudioSourceManager

class AudioSourceManager(var audioSourceFactory: AudioSourceFactory) : AudioProvider

Provide audio source management.

The Audio source exposed to client by SharedDataStream which can use multiple reader.

And manage open/close state based on reference count.

Parameters

audioSourceFactory

The audio source factory which can create SharedDataStream

Constructors

Link copied to clipboard
fun AudioSourceManager(audioSourceFactory: AudioSourceFactory)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Listener

Functions

Link copied to clipboard
open override fun acquireAudioInputStream(consumer: Any): SharedDataStream?

Return SharedDataStream if already open or success to open.

Link copied to clipboard
fun addListener(listener: AudioSourceManager.Listener)
Link copied to clipboard
open override fun getFormat(): AudioFormat
Link copied to clipboard
open override fun releaseAudioInputStream(consumer: Any)

Close audioInputStream if all consumer references released.

Link copied to clipboard
fun removeListener(listener: AudioSourceManager.Listener)
Link copied to clipboard
fun reset()

Release all references and close stream.

Properties

Link copied to clipboard
var audioSourceFactory: AudioSourceFactory