ProcessingResult

public final class ProcessingResult


Contains the output audio buffer and corresponding audio type from a processed audio chunk.

Delivered to onProcessed when an audio buffer has been processed by a StudioSoundSession.

Summary

Public fields

final int
final ByteBuffer

Public constructors

ProcessingResult(
    ByteBuffer byteBuffer,
    @StudioSoundAudioType int audioType
)

Constructs a new ProcessingResult with the specified audio buffer and audio type.

Public methods

boolean
int

Returns the audio type identifying this processed audio track.

ByteBuffer

Returns the ByteBuffer containing the isolated audio data.

int
String

Public fields

audioType

@StudioSoundAudioType
public final int audioType

byteBuffer

public final ByteBuffer byteBuffer

Public constructors

ProcessingResult

public ProcessingResult(
    ByteBuffer byteBuffer,
    @StudioSoundAudioType int audioType
)

Constructs a new ProcessingResult with the specified audio buffer and audio type.

Parameters
ByteBuffer byteBuffer

the ByteBuffer containing the processed audio data

@StudioSoundAudioType int audioType

the StudioSoundAudioType identifying the isolated audio track

Public methods

equals

public boolean equals(@Nullable Object o)

getAudioType

@StudioSoundAudioType
public int getAudioType()

Returns the audio type identifying this processed audio track.

Returns
int

the StudioSoundAudioType of the isolated track

getByteBuffer

public ByteBuffer getByteBuffer()

Returns the ByteBuffer containing the isolated audio data.

Note: The Studio Sound service owns this ByteBuffer. Its contents may be overwritten when subsequent audio chunks are processed or after the session is released. Callers should copy any audio data they need to retain beyond the callback invocation.

Returns
ByteBuffer

the ByteBuffer containing raw PCM audio data for this track

hashCode

public int hashCode()

toString

public String toString()