|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vwp.sound.mod.sound.output.JavaSoundOutput
public class JavaSoundOutput
A output plugin that plays sound using the javax.sound.sampled api. This output plugin support 8 and 16 bits playback in mono or stereo using 11025, 22050 or 44100 samples per second
Field Summary |
---|
Fields inherited from interface com.vwp.sound.mod.sound.output.Output |
---|
INPUT_RATE |
Constructor Summary | |
---|---|
JavaSoundOutput(SoundDataFormat format,
int bufferTime)
Creates a StereoSoundOutput with a output buffer of the given size. |
Method Summary | |
---|---|
boolean |
close()
closes the output plugin |
SoundDataFormat |
getFormat()
|
boolean |
isOpen()
tests if an output plugin is open for writeing |
protected int |
mono16(byte[] data,
int ofs,
int len,
double grad)
|
protected int |
mono8(byte[] data,
int ofs,
int len,
double grad)
|
boolean |
open()
opens the output plugin for writing |
protected int |
stereo16(byte[] data,
int ofs,
int len,
double grad)
|
protected int |
stereo8(byte[] data,
int ofs,
int len,
double grad)
|
boolean |
supports(SoundDataFormat format)
|
int |
write(byte[] data,
int ofs,
int len)
try to write len bytes from offset ofs from the array data. |
protected int |
writeConv(byte[] data,
int ofs,
int len)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaSoundOutput(SoundDataFormat format, int bufferTime) throws PlayerException
bufferTime
- the size of the output plugin in milliseconds.
PlayerException
Method Detail |
---|
public boolean supports(SoundDataFormat format)
public SoundDataFormat getFormat()
public boolean isOpen()
Output
isOpen
in interface Output
public boolean open()
Output
open
in interface Output
public boolean close()
Output
close
in interface Output
public int write(byte[] data, int ofs, int len)
Output
write
in interface Output
data
- the array containing data to writeofs
- the offset in data to write fromlen
- the number of samples to write
protected int writeConv(byte[] data, int ofs, int len)
protected int mono8(byte[] data, int ofs, int len, double grad)
protected int stereo8(byte[] data, int ofs, int len, double grad)
protected int mono16(byte[] data, int ofs, int len, double grad)
protected int stereo16(byte[] data, int ofs, int len, double grad)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |