Dela via


PullAudioOutputStream Class

public final class PullAudioOutputStream
extends AudioOutputStream

Represents memory backed push audio output stream used for custom audio output configurations.

Constructor Summary

Constructor Description
PullAudioOutputStream(IntRef stream)

Internal constructor for PullAudioOutputStream.

Method Summary

Modifier and Type Method and Description
static PullAudioOutputStream create()

Creates a memory backed PullAudioOutputStream.

long read(byte[] dataBuffer)

Reads the audio data specified by making an internal copy of the data.

Methods inherited from AudioOutputStream

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

PullAudioOutputStream

public PullAudioOutputStream(IntRef stream)

Internal constructor for PullAudioOutputStream.

Parameters:

stream - the native handle of the audio output stream.

Method Details

create

public static PullAudioOutputStream create()

Creates a memory backed PullAudioOutputStream.

Returns:

The pull audio output stream being created.

read

public long read(byte[] dataBuffer)

Reads the audio data specified by making an internal copy of the data. The maximal number of bytes to be read is determined by the size of dataBuffer. If there is no data immediately available, read() blocks until the next data becomes available.

Parameters:

dataBuffer - The audio buffer of which this function will make a copy to.

Returns:

The number of bytes filled, or 0 in case the stream hits its end and there is no more data available.

Applies to