AudioOutputProvider
interface AudioOutputProvider
AudioTrackAudioOutputProvider |
A default implementation of |
ForwardingAudioOutputProvider |
A forwarding base class that delegates all calls to the provided |
A provider for AudioOutput instances and for querying their support.
Summary
Nested types |
|---|
|
Thrown when a failure occurs configuring the output. |
|
Configuration for an audio format and its output preferences. |
|
Builder for |
|
Level of support for an audio format by the provider. |
|
A builder to create |
|
Thrown when a failure occurs initializing the output. |
interface AudioOutputProvider.ListenerListener for |
|
Configuration for an |
|
Builder for |
@DocumentedThe level of support the provider has for a format. |
Constants |
|
|---|---|
const Int |
The provider supports the format directly, without the need for internal transcoding. |
const Int |
The provider supports the format, but needs to transcode it internally to do so. |
const Int |
The provider does not support the format. |
Public functions |
|
|---|---|
Unit |
addListener(listener: AudioOutputProvider.Listener!)Adds a |
AudioOutput! |
Returns an |
AudioOutputProvider.FormatSupport! |
getFormatSupport(formatConfig: AudioOutputProvider.FormatConfig!)Returns the |
AudioOutputProvider.OutputConfig! |
getOutputConfig(formatConfig: AudioOutputProvider.FormatConfig!)Returns the |
Unit |
release()Releases resources held by the provider. |
Unit |
removeListener(listener: AudioOutputProvider.Listener!)Removes a |
Unit |
@UnstableApiSets the |
Constants
FORMAT_SUPPORTED_DIRECTLY
const val FORMAT_SUPPORTED_DIRECTLY = 2: Int
The provider supports the format directly, without the need for internal transcoding.
FORMAT_SUPPORTED_WITH_TRANSCODING
const val FORMAT_SUPPORTED_WITH_TRANSCODING = 1: Int
The provider supports the format, but needs to transcode it internally to do so. Internal transcoding may result in lower quality and higher CPU load in some cases.
Public functions
addListener
fun addListener(listener: AudioOutputProvider.Listener!): Unit
Adds a Listener.
| Parameters | |
|---|---|
listener: AudioOutputProvider.Listener! |
The listener to add. |
getAudioOutput
fun getAudioOutput(config: AudioOutputProvider.OutputConfig!): AudioOutput!
Returns an AudioOutput for the given config.
| Parameters | |
|---|---|
config: AudioOutputProvider.OutputConfig! |
The |
| Returns | |
|---|---|
AudioOutput! |
The |
getFormatSupport
fun getFormatSupport(formatConfig: AudioOutputProvider.FormatConfig!): AudioOutputProvider.FormatSupport!
Returns the level of support that this provider has for a given FormatConfig.
| Parameters | |
|---|---|
formatConfig: AudioOutputProvider.FormatConfig! |
The |
| Returns | |
|---|---|
AudioOutputProvider.FormatSupport! |
The |
getOutputConfig
fun getOutputConfig(formatConfig: AudioOutputProvider.FormatConfig!): AudioOutputProvider.OutputConfig!
Returns the OutputConfig for the given format.
| Parameters | |
|---|---|
formatConfig: AudioOutputProvider.FormatConfig! |
The |
| Returns | |
|---|---|
AudioOutputProvider.OutputConfig! |
The |
removeListener
fun removeListener(listener: AudioOutputProvider.Listener!): Unit
Removes a Listener.
| Parameters | |
|---|---|
listener: AudioOutputProvider.Listener! |
The listener to remove. |