Added in API level 30

AudioTrack.OnCodecFormatChangedListener

public static interface AudioTrack.OnCodecFormatChangedListener

android.media.AudioTrack.OnCodecFormatChangedListener


Interface definition for a listener for codec format changes.

Summary

Public methods

abstract void onCodecFormatChanged(AudioTrack audioTrack, AudioMetadataReadMap info)

Called when the compressed codec format changes.

Public methods

onCodecFormatChanged

Added in API level 30
public abstract void onCodecFormatChanged (AudioTrack audioTrack, 
                AudioMetadataReadMap info)

Called when the compressed codec format changes.

Parameters
audioTrack AudioTrack: is the AudioTrack instance associated with the codec. This value cannot be null.

info AudioMetadataReadMap: is a AudioMetadataReadMap of values which contains decoded format changes reported by the codec. Not all hardware codecs indicate codec format changes. Acceptable keys are taken from AudioMetadata.Format.KEY_* range, with the associated value type. This value may be null.