SonicAudioProcessor


@UnstableApi
public final class SonicAudioProcessor extends SonicAudioProcessor


Summary

Public constructors

Inherited Constants

From androidx.media3.common.audio.AudioProcessor
static final ByteBuffer

An empty, direct ByteBuffer.

From androidx.media3.common.audio.SonicAudioProcessor
static final int

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

Inherited methods

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

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

final void

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.

final long
getMediaDuration(long playoutDuration)

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

final ByteBuffer

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

final long
getPlayoutDuration(long mediaDuration)

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

final long

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

final boolean

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

final boolean

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

final void

Queues an end of stream signal.

final void
queueInput(ByteBuffer inputBuffer)

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

final void

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

final void
setOutputSampleRateHz(int sampleRateHz)

Sets the sample rate for output audio, in Hertz.

final void
setPitch(float pitch)

Sets the target playback pitch.

final void
setSpeed(float speed)

Sets the target playback speed.

Public constructors

SonicAudioProcessor

public SonicAudioProcessor()