public interface

AudioSource.AudioSourceCallback

 androidx.camera.video.internal.audio.AudioSource.AudioSourceCallback

Overview

The callback for receiving the audio source status.

Summary

Methods
public voidonAmplitudeValue(double maxAmplitude)

The method called to retrieve audio amplitude values.

public voidonError(java.lang.Throwable t)

The method called when the audio source encountered errors.

public voidonSilenceStateChanged(boolean silenced)

The method called when the audio source silence state changed.

public voidonSuspendStateChanged(boolean suspended)

The method called when the audio source suspend state changed.

Methods

public void onSuspendStateChanged(boolean suspended)

The method called when the audio source suspend state changed.

One case where the audio source goes into suspend state is when it is started but the BufferProvider is in state.

public void onSilenceStateChanged(boolean silenced)

The method called when the audio source silence state changed.

The audio source is silenced when the audio record is occupied by privilege application. When it happens, the audio source will keep providing audio data with silence sample.

public void onError(java.lang.Throwable t)

The method called when the audio source encountered errors.

public void onAmplitudeValue(double maxAmplitude)

The method called to retrieve audio amplitude values.