SonicAudioProcessor


@UnstableApi
class SonicAudioProcessor : SonicAudioProcessor


Summary

Public constructors

Inherited Constants

From androidx.media3.common.audio.AudioProcessor
const ByteBuffer!

An empty, direct ByteBuffer.

From androidx.media3.common.audio.SonicAudioProcessor
const Int

Indicates that the output sample rate should be the same as the input.

Inherited functions

From androidx.media3.common.audio.SonicAudioProcessor
AudioProcessor.AudioFormat!

Configures the processor to process input audio with the specified format.

Unit

Clears any buffered data and pending output.

Long

Returns the expected duration of the output stream when the processor is applied given a input durationUs.

Long
getMediaDuration(playoutDuration: Long)

Returns the media duration corresponding to the specified playout duration, taking speed adjustment into account.

ByteBuffer!

Returns a buffer containing processed output data between its position and limit.

Long
getPlayoutDuration(mediaDuration: Long)

Returns the playout duration corresponding to the specified media duration, taking speed adjustment into account.

Long

Returns the number of bytes processed since last flush or reset.

Boolean

Returns whether the processor is configured and will process input buffers.

Boolean

Returns whether this processor will return no more output from getOutput until flush has been called and more input has been queued.

Unit

Queues an end of stream signal.

Unit
queueInput(inputBuffer: ByteBuffer!)

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

Unit

Resets the processor to its unconfigured state, releasing any resources.

Unit
setOutputSampleRateHz(sampleRateHz: Int)

Sets the sample rate for output audio, in Hertz.

Unit
setPitch(pitch: Float)

Sets the target playback pitch.

Unit
setSpeed(speed: Float)

Sets the target playback speed.

Public constructors

SonicAudioProcessor

SonicAudioProcessor()