|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.datax.devices.SpeakerDestination
Class to play output to the computer speaker. Uses the jaudio system to communicate with the sound device. Consequently, jaudio.dll must be in your system path.
Field Summary | |
private byte[] |
bData
|
private boolean |
bMute
|
private byte[] |
bOldData
|
private boolean |
bOpen
|
private int |
bytesRead
|
(package private) int |
iDevice
|
private int |
iRead
|
private JAudioBlock |
jabBlockToWaitOn
|
private JAudioBlock |
jabLastBlock
|
private JAudioBlock |
jabTemp
|
private JAudioDevice |
jad
|
private JABQueue |
qFree
|
private static int |
QUEUE_SIZE
JAudioBlock queue size |
private JABQueue |
qUsed
|
static int |
SAMPLE_SIZE
Sample size (MUST use the Channel sample size!) |
private Stats |
speakerStats
|
Constructor Summary | |
SpeakerDestination()
Creates a speaker object by acquiring the necessary resources from jaudio. |
Method Summary | |
void |
close()
Closes the device. |
PropertiesCollection |
getProperties()
Returns a collection of properties supported. |
Stats |
getStatistics()
Method to get the statistics for the speaker device. |
boolean |
mute(boolean mute)
Mutes the device |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the given properties collection into the device |
void |
write(byte[] b)
Method to write data to the speaker. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int SAMPLE_SIZE
private static final int QUEUE_SIZE
private JAudioDevice jad
private JAudioBlock jabLastBlock
private JAudioBlock jabBlockToWaitOn
private JABQueue qUsed
private JABQueue qFree
private boolean bMute
private boolean bOpen
private Stats speakerStats
int iDevice
private int bytesRead
private JAudioBlock jabTemp
private byte[] bData
private byte[] bOldData
private int iRead
Constructor Detail |
public SpeakerDestination() throws DataException
Method Detail |
public void write(byte[] b) throws DataException
b
- the byte array to be written to the speakerpublic void close()
public boolean mute(boolean mute)
mute
- the devicepublic Stats getStatistics()
public PropertiesCollection getProperties() throws DataException
public void setProperties(PropertiesCollection pc) throws DataException
public void setPeerProperties(PropertiesCollection pc) throws DataException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |