org.tritonus.lowlevel.esd
Class EsdRecordingStream

java.lang.Object
  extended byorg.tritonus.lowlevel.esd.Esd
      extended byorg.tritonus.lowlevel.esd.EsdRecordingStream

public class EsdRecordingStream
extends Esd


Field Summary
 
Fields inherited from class org.tritonus.lowlevel.esd.Esd
ESD_BITS16, ESD_BITS8, ESD_MONO, ESD_PLAY, ESD_STEREO, ESD_STREAM
 
Constructor Summary
EsdRecordingStream()
           
 
Method Summary
 void close()
          Closes the connection to esd.
 void open(int nFormat, int nSampleRate)
          Opens the connection to esd and initiates a stream.
 int read(byte[] abData, int nOffset, int nLength)
          Reads a block of data to esd.
 
Methods inherited from class org.tritonus.lowlevel.esd.Esd
isLibraryAvailable, loadNativeLibrary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EsdRecordingStream

public EsdRecordingStream()
Method Detail

open

public void open(int nFormat,
                 int nSampleRate)
Opens the connection to esd and initiates a stream.


read

public int read(byte[] abData,
                int nOffset,
                int nLength)
Reads a block of data to esd. Before using this method, you have to open a connection to esd with open(). After being done, call close() to release native and server-side resources.

Returns:
the number of bytes read

close

public void close()
Closes the connection to esd. With this call, all resources inside esd associated with this stream are freed.??? Calls to the read() method are no longer allowed after return from this call.