com.jcraft.jesd
Class JEsd

java.lang.Object
  extended by com.jcraft.jesd.JEsd

public class JEsd
extends Object


Field Summary
static int ESD_ADPCM
           
static int ESD_BITS16
           
static int ESD_BITS8
           
static int ESD_BUF_SIZE
           
static int ESD_DEFAULT_PORT
           
static int ESD_DEFAULT_RATE
           
static int ESD_KEY_LEN
           
static int ESD_LOOP
           
static int ESD_MASK_BITS
           
static int ESD_MASK_CHAN
           
static int ESD_MASK_FUNC
           
static int ESD_MASK_MODE
           
static int ESD_MONITOR
           
static int ESD_MONO
           
static int ESD_NAME_MAX
           
static int ESD_PLAY
           
static int ESD_RECORD
           
static int ESD_SAMPLE
           
static int ESD_STEREO
           
static int ESD_STOP
           
static int ESD_STREAM
           
static int ESM_ERROR
           
static int ESM_ON_AUTOSTANDBY
           
static int ESM_ON_STANDBY
           
static int ESM_RUNNING
           
static String version
           
 
Constructor Summary
JEsd()
           
JEsd(int port)
           
JEsd(String host)
           
JEsd(String host, int port)
           
 
Method Summary
 void close()
           
 int confirm_sample_cache()
           
 int file_cache(String name_prefix, String filename)
           
static JEsd filter_stream(int format, int rate, String host, String name)
           
 int lock()
           
static JEsd monitor_stream(int format, int rate, String host, String name)
           
static void play_file(String name_prefix, String filename, boolean fallback)
           
static JEsd play_stream_fallback(int format, int rate, String host, String name)
           
static JEsd play_stream(int format, int rate, String host, String name)
           
 int read(byte[] array, int size)
           
static JEsd record_stream_fallback(int format, int rate, String host, String name)
           
static JEsd record_stream(int format, int rate, String host, String name)
           
 int resume()
           
 int sample_cache(int format, int rate, int size, String name)
           
 int sample_free(int sample)
           
 int sample_getid(String name)
           
 int sample_loop(int sample)
           
 int sample_play(int sample)
           
 void send_file(WAVEFile file, int bytes_per_frame)
           
 int standby()
           
 int unlock()
           
 int write(byte[] array, int size)
           
 int write(byte[] array, int off, int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final String version
See Also:
Constant Field Values

ESD_MASK_MODE

public static final int ESD_MASK_MODE
See Also:
Constant Field Values

ESD_STREAM

public static final int ESD_STREAM
See Also:
Constant Field Values

ESD_SAMPLE

public static final int ESD_SAMPLE
See Also:
Constant Field Values

ESD_ADPCM

public static final int ESD_ADPCM
See Also:
Constant Field Values

ESD_MASK_FUNC

public static final int ESD_MASK_FUNC
See Also:
Constant Field Values

ESD_PLAY

public static final int ESD_PLAY
See Also:
Constant Field Values

ESD_MONITOR

public static final int ESD_MONITOR
See Also:
Constant Field Values

ESD_RECORD

public static final int ESD_RECORD
See Also:
Constant Field Values

ESD_STOP

public static final int ESD_STOP
See Also:
Constant Field Values

ESD_LOOP

public static final int ESD_LOOP
See Also:
Constant Field Values

ESD_BUF_SIZE

public static final int ESD_BUF_SIZE
See Also:
Constant Field Values

ESD_NAME_MAX

public static final int ESD_NAME_MAX
See Also:
Constant Field Values

ESD_KEY_LEN

public static final int ESD_KEY_LEN
See Also:
Constant Field Values

ESM_ERROR

public static final int ESM_ERROR
See Also:
Constant Field Values

ESM_ON_STANDBY

public static final int ESM_ON_STANDBY
See Also:
Constant Field Values

ESM_ON_AUTOSTANDBY

public static final int ESM_ON_AUTOSTANDBY
See Also:
Constant Field Values

ESM_RUNNING

public static final int ESM_RUNNING
See Also:
Constant Field Values

ESD_MASK_CHAN

public static final int ESD_MASK_CHAN
See Also:
Constant Field Values

ESD_MONO

public static final int ESD_MONO
See Also:
Constant Field Values

ESD_STEREO

public static final int ESD_STEREO
See Also:
Constant Field Values

ESD_MASK_BITS

public static final int ESD_MASK_BITS
See Also:
Constant Field Values

ESD_BITS8

public static final int ESD_BITS8
See Also:
Constant Field Values

ESD_BITS16

public static final int ESD_BITS16
See Also:
Constant Field Values

ESD_DEFAULT_PORT

public static final int ESD_DEFAULT_PORT
See Also:
Constant Field Values

ESD_DEFAULT_RATE

public static final int ESD_DEFAULT_RATE
See Also:
Constant Field Values
Constructor Detail

JEsd

public JEsd()
     throws JEsdException
Throws:
JEsdException

JEsd

public JEsd(int port)
     throws JEsdException
Throws:
JEsdException

JEsd

public JEsd(String host)
     throws JEsdException
Throws:
JEsdException

JEsd

public JEsd(String host,
            int port)
     throws JEsdException
Throws:
JEsdException
Method Detail

lock

public int lock()

unlock

public int unlock()

standby

public int standby()

resume

public int resume()

play_stream

public static JEsd play_stream(int format,
                               int rate,
                               String host,
                               String name)
                        throws JEsdException
Throws:
JEsdException

play_stream_fallback

public static JEsd play_stream_fallback(int format,
                                        int rate,
                                        String host,
                                        String name)
                                 throws JEsdException
Throws:
JEsdException

monitor_stream

public static JEsd monitor_stream(int format,
                                  int rate,
                                  String host,
                                  String name)
                           throws JEsdException
Throws:
JEsdException

filter_stream

public static JEsd filter_stream(int format,
                                 int rate,
                                 String host,
                                 String name)
                          throws JEsdException
Throws:
JEsdException

record_stream

public static JEsd record_stream(int format,
                                 int rate,
                                 String host,
                                 String name)
                          throws JEsdException
Throws:
JEsdException

record_stream_fallback

public static JEsd record_stream_fallback(int format,
                                          int rate,
                                          String host,
                                          String name)
                                   throws JEsdException
Throws:
JEsdException

sample_cache

public int sample_cache(int format,
                        int rate,
                        int size,
                        String name)

confirm_sample_cache

public int confirm_sample_cache()

sample_getid

public int sample_getid(String name)

sample_free

public int sample_free(int sample)

sample_play

public int sample_play(int sample)

sample_loop

public int sample_loop(int sample)

file_cache

public int file_cache(String name_prefix,
                      String filename)
               throws IOException
Throws:
IOException

play_file

public static void play_file(String name_prefix,
                             String filename,
                             boolean fallback)
                      throws IOException
Throws:
IOException

send_file

public void send_file(WAVEFile file,
                      int bytes_per_frame)

write

public int write(byte[] array,
                 int size)

write

public int write(byte[] array,
                 int off,
                 int size)

read

public int read(byte[] array,
                int size)

close

public void close()