DefaultAudioMixer.Factory


class DefaultAudioMixer.Factory : AudioMixer.Factory


An AudioMixer.Factory implementation for DefaultAudioMixer instances.

Summary

Public constructors

Creates an instance.

Factory(outputSilenceWithNoSources: Boolean, clipFloatOutput: Boolean)

Creates an instance.

Factory(
    outputSilenceWithNoSources: Boolean,
    clipFloatOutput: Boolean,
    useConstantPowerMixingMatrices: Boolean
)

Creates an instance.

Public functions

DefaultAudioMixer!

Public constructors

Factory

Factory()

Creates an instance. This is equivalent to new Factory(false, true, false).

Factory

Factory(outputSilenceWithNoSources: Boolean, clipFloatOutput: Boolean)

Creates an instance. This is equivalent to new Factory(outputSilenceWithNoSources, clipFloatOutput, false).

Parameters
outputSilenceWithNoSources: Boolean

Whether to output silence when there are no sources.

clipFloatOutput: Boolean

Whether to clip the output signal to be in the [-1.0, 1.0] range if the output encoding is ENCODING_PCM_FLOAT. This parameter is ignored for non-float output signals. For float output signals, non-float input signals are converted to float signals in the [-1.0, 1.0] range. All input signals (float or non-float) are then added and the result is clipped if and only if clipFloatOutput is true.

Factory

Factory(
    outputSilenceWithNoSources: Boolean,
    clipFloatOutput: Boolean,
    useConstantPowerMixingMatrices: Boolean
)

Creates an instance.

Parameters
outputSilenceWithNoSources: Boolean

Whether to output silence when there are no sources.

clipFloatOutput: Boolean

Whether to clip the output signal to be in the [-1.0, 1.0] range if the output encoding is ENCODING_PCM_FLOAT. This parameter is ignored for non-float output signals. For float output signals, non-float input signals are converted to float signals in the [-1.0, 1.0] range. All input signals (float or non-float) are then added and the result is clipped if and only if clipFloatOutput is true.

useConstantPowerMixingMatrices: Boolean

Whether to upmix/downmix using constant power mixing matrices. If false, uses constant gain mixing matrices.

Public functions

create

fun create(): DefaultAudioMixer!