PullAudioInputStream Class

public final class PullAudioInputStream
extends AudioInputStream

Represents audio input stream used for custom audio input configurations. Note: close() must be called in order to release underlying resources held by the object.

Method Summary

Modifier and Type Method and Description
void close()

Explicitly frees any external resource attached to the object Note: close() must be called in order to release underlying resources held by the object.

static PullAudioInputStream create(PullAudioInputStreamCallback callback)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz, 16 bit, mono PCM).

static PullAudioInputStream create(PullAudioInputStreamCallback callback, AudioStreamFormat format)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods.

Methods inherited from AudioInputStream

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

Method Details

close

public void close()

Explicitly frees any external resource attached to the object Note: close() must be called in order to release underlying resources held by the object.

Overrides:

PullAudioInputStream.close()

create

public static PullAudioInputStream create(PullAudioInputStreamCallback callback)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz, 16 bit, mono PCM).

Parameters:

callback - The custom audio input object, derived from PullAudioInputStreamCustomCallback

Returns:

The push audio input stream being created.

create

public static PullAudioInputStream create(PullAudioInputStreamCallback callback, AudioStreamFormat format)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods.

Parameters:

callback - The custom audio input object, derived from PullAudioInputStreamCustomCallback
format - The audio data format in which audio will be returned from the callback's read() method.

Returns:

The push audio input stream being created.

Applies to