org.hermit.android.io
Class AudioReader.Listener

java.lang.Object
  extended by org.hermit.android.io.AudioReader.Listener
Enclosing class:
AudioReader

public abstract static class AudioReader.Listener
extends java.lang.Object

Listener for audio reads.


Field Summary
static int ERR_INIT_FAILED
          Audio read error code: the audio reader failed to initialise.
static int ERR_OK
          Audio read error code: no error.
static int ERR_READ_FAILED
          Audio read error code: an audio read failed.
 
Constructor Summary
AudioReader.Listener()
           
 
Method Summary
abstract  void onReadComplete(short[] buffer)
          An audio read has completed.
abstract  void onReadError(int error)
          An error has occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERR_OK

public static final int ERR_OK
Audio read error code: no error.

See Also:
Constant Field Values

ERR_INIT_FAILED

public static final int ERR_INIT_FAILED
Audio read error code: the audio reader failed to initialise.

See Also:
Constant Field Values

ERR_READ_FAILED

public static final int ERR_READ_FAILED
Audio read error code: an audio read failed.

See Also:
Constant Field Values
Constructor Detail

AudioReader.Listener

public AudioReader.Listener()
Method Detail

onReadComplete

public abstract void onReadComplete(short[] buffer)
An audio read has completed.

Parameters:
buffer - Buffer containing the data.

onReadError

public abstract void onReadError(int error)
An error has occurred. The reader has been terminated.

Parameters:
error - ERR_XXX code describing the error.