org.tritonus.lowlevel.esd
Class EsdStream

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

public class EsdStream
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
EsdStream()
           
 
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 write(byte[] abData, int nOffset, int nLength)
          Writes 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

EsdStream

public EsdStream()
Method Detail

open

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


write

public int write(byte[] abData,
                 int nOffset,
                 int nLength)
Writes 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 written

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 write() method are no longer allowed after return from this call.