com.jcraft.jesd

Class JEsd


public class JEsd
extends java.lang.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(String host)
JEsd(String host, int port)
JEsd(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(int format, int rate, String host, String name)
static JEsd
play_stream_fallback(int format, int rate, String host, String name)
int
read(byte[] array, int size)
static JEsd
record_stream(int format, int rate, String host, String name)
static JEsd
record_stream_fallback(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)

Field Details

ESD_ADPCM

public static final int ESD_ADPCM
Field Value:
512

ESD_BITS16

public static final int ESD_BITS16
Field Value:
1

ESD_BITS8

public static final int ESD_BITS8
Field Value:
0

ESD_BUF_SIZE

public static final int ESD_BUF_SIZE
Field Value:
4096

ESD_DEFAULT_PORT

public static final int ESD_DEFAULT_PORT
Field Value:
16001

ESD_DEFAULT_RATE

public static final int ESD_DEFAULT_RATE
Field Value:
44100

ESD_KEY_LEN

public static final int ESD_KEY_LEN
Field Value:
16

ESD_LOOP

public static final int ESD_LOOP
Field Value:
8192

ESD_MASK_BITS

public static final int ESD_MASK_BITS
Field Value:
15

ESD_MASK_CHAN

public static final int ESD_MASK_CHAN
Field Value:
240

ESD_MASK_FUNC

public static final int ESD_MASK_FUNC
Field Value:
61440

ESD_MASK_MODE

public static final int ESD_MASK_MODE
Field Value:
3840

ESD_MONITOR

public static final int ESD_MONITOR
Field Value:
0

ESD_MONO

public static final int ESD_MONO
Field Value:
16

ESD_NAME_MAX

public static final int ESD_NAME_MAX
Field Value:
128

ESD_PLAY

public static final int ESD_PLAY
Field Value:
4096

ESD_RECORD

public static final int ESD_RECORD
Field Value:
8192

ESD_SAMPLE

public static final int ESD_SAMPLE
Field Value:
256

ESD_STEREO

public static final int ESD_STEREO
Field Value:
32

ESD_STOP

public static final int ESD_STOP
Field Value:
0

ESD_STREAM

public static final int ESD_STREAM
Field Value:
0

ESM_ERROR

public static final int ESM_ERROR
Field Value:
0

ESM_ON_AUTOSTANDBY

public static final int ESM_ON_AUTOSTANDBY
Field Value:
2

ESM_ON_STANDBY

public static final int ESM_ON_STANDBY
Field Value:
1

ESM_RUNNING

public static final int ESM_RUNNING
Field Value:
3

version

public static final String version

Constructor Details

JEsd

public JEsd()
            throws JEsdException

JEsd

public JEsd(String host)
            throws JEsdException

JEsd

public JEsd(String host,
            int port)
            throws JEsdException

JEsd

public JEsd(int port)
            throws JEsdException

Method Details

close

public void close()

confirm_sample_cache

public int confirm_sample_cache()

file_cache

public int file_cache(String name_prefix,
                      String filename)
            throws java.io.IOException

filter_stream

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

lock

public int lock()

monitor_stream

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

play_file

public static void play_file(String name_prefix,
                             String filename,
                             boolean fallback)
            throws java.io.IOException

play_stream

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

play_stream_fallback

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

read

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

record_stream

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

record_stream_fallback

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

resume

public int resume()

sample_cache

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

sample_free

public int sample_free(int sample)

sample_getid

public int sample_getid(String name)

sample_loop

public int sample_loop(int sample)

sample_play

public int sample_play(int sample)

send_file

public void send_file(WAVEFile file,
                      int bytes_per_frame)

standby

public int standby()

unlock

public int unlock()

write

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

write

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