Back to Exoplayer

ChannelMixingAudioProcessor (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/audio/ChannelMixingAudioProcessor.html

latest5.8 KB
Original Source

Package com.google.android.exoplayer2.audio

Class ChannelMixingAudioProcessor


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classChannelMixingAudioProcessorextends[BaseAudioProcessor](BaseAudioProcessor.html "class in com.google.android.exoplayer2.audio")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

An AudioProcessor that handles mixing and scaling audio channels. Call putChannelMixingMatrix(ChannelMixingMatrix) specifying mixing matrices to apply for each possible input channel count before using the audio processor. Input and output are 16-bit PCM.

Nested Class Summary

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.audio.AudioProcessor

AudioProcessor.AudioFormat, AudioProcessor.UnhandledAudioFormatException

Field Summary

- 

Fields inherited from class com.google.android.exoplayer2.audio.BaseAudioProcessor

inputAudioFormat, outputAudioFormat

- 

Fields inherited from interface com.google.android.exoplayer2.audio.AudioProcessor

EMPTY_BUFFER

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | ChannelMixingAudioProcessor() | Deprecated.

Creates a new audio processor for mixing and scaling audio channels. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | protected AudioProcessor.AudioFormat | onConfigure​(AudioProcessor.AudioFormat inputAudioFormat) | Deprecated.

Called when the processor is configured for a new input format. | | void | putChannelMixingMatrix​(ChannelMixingMatrix matrix) | Deprecated.

Stores a channel mixing matrix for processing audio with a given channel count. | | void | queueInput​(ByteBuffer inputBuffer) | Deprecated.

Queues audio data between the position and limit of the inputBuffer for processing. |

- 

Methods inherited from class com.google.android.exoplayer2.audio.BaseAudioProcessor

configure, flush, getOutput, hasPendingOutput, isActive, isEnded, onFlush, onQueueEndOfStream, onReset, queueEndOfStream, replaceOutputBuffer, reset

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

ChannelMixingAudioProcessor

public ChannelMixingAudioProcessor()

Deprecated.

Creates a new audio processor for mixing and scaling audio channels.

Method Detail

- 

putChannelMixingMatrix

public void putChannelMixingMatrix​([ChannelMixingMatrix](ChannelMixingMatrix.html "class in com.google.android.exoplayer2.audio")matrix)

Deprecated.

Stores a channel mixing matrix for processing audio with a given channel count. Overwrites any previously stored matrix for the same input channel count.

- 

onConfigure

protected[AudioProcessor.AudioFormat](AudioProcessor.AudioFormat.html "class in com.google.android.exoplayer2.audio")onConfigure​([AudioProcessor.AudioFormat](AudioProcessor.AudioFormat.html "class in com.google.android.exoplayer2.audio")inputAudioFormat)
                                          throws[AudioProcessor.UnhandledAudioFormatException](AudioProcessor.UnhandledAudioFormatException.html "class in com.google.android.exoplayer2.audio")

Deprecated.

Description copied from class: BaseAudioProcessor

Called when the processor is configured for a new input format. Overrides:onConfigure in class BaseAudioProcessorThrows:AudioProcessor.UnhandledAudioFormatException

- 

queueInput

public void queueInput​([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")inputBuffer)

Deprecated.

Description copied from interface: AudioProcessor

Queues audio data between the position and limit of the inputBuffer for processing. After calling this method, processed output may be available via AudioProcessor.getOutput(). Calling queueInput(ByteBuffer) again invalidates any pending output. Parameters:inputBuffer - The input buffer to process. It must be a direct byte buffer with native byte order. Its contents are treated as read-only. Its position will be advanced by the number of bytes consumed (which may be zero). The caller retains ownership of the provided buffer.