Package com.jcraft.jesd
Class JEsd
- java.lang.Object
-
- com.jcraft.jesd.JEsd
-
public class JEsd extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description 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 java.lang.String
version
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
confirm_sample_cache()
int
file_cache(java.lang.String name_prefix, java.lang.String filename)
static JEsd
filter_stream(int format, int rate, java.lang.String host, java.lang.String name)
int
lock()
static JEsd
monitor_stream(int format, int rate, java.lang.String host, java.lang.String name)
static void
play_file(java.lang.String name_prefix, java.lang.String filename, boolean fallback)
static JEsd
play_stream(int format, int rate, java.lang.String host, java.lang.String name)
static JEsd
play_stream_fallback(int format, int rate, java.lang.String host, java.lang.String name)
int
read(byte[] array, int size)
static JEsd
record_stream(int format, int rate, java.lang.String host, java.lang.String name)
static JEsd
record_stream_fallback(int format, int rate, java.lang.String host, java.lang.String name)
int
resume()
int
sample_cache(int format, int rate, int size, java.lang.String name)
int
sample_free(int sample)
int
sample_getid(java.lang.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 Detail
-
version
public static final java.lang.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(java.lang.String host) throws JEsdException
- Throws:
JEsdException
-
JEsd
public JEsd(java.lang.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, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
play_stream_fallback
public static JEsd play_stream_fallback(int format, int rate, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
monitor_stream
public static JEsd monitor_stream(int format, int rate, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
filter_stream
public static JEsd filter_stream(int format, int rate, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
record_stream
public static JEsd record_stream(int format, int rate, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
record_stream_fallback
public static JEsd record_stream_fallback(int format, int rate, java.lang.String host, java.lang.String name) throws JEsdException
- Throws:
JEsdException
-
sample_cache
public int sample_cache(int format, int rate, int size, java.lang.String name)
-
confirm_sample_cache
public int confirm_sample_cache()
-
sample_getid
public int sample_getid(java.lang.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(java.lang.String name_prefix, java.lang.String filename) throws java.io.IOException
- Throws:
java.io.IOException
-
play_file
public static void play_file(java.lang.String name_prefix, java.lang.String filename, boolean fallback) throws java.io.IOException
- Throws:
java.io.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()
-
-