|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavaclient.PlayerDevice
javaclient.AudioInterface
public class AudioInterface
The audio interface is used to control sound hardware, if equipped.
| Field Summary |
|---|
| Fields inherited from class javaclient.PlayerDevice |
|---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
| Constructor Summary | |
|---|---|
AudioInterface(PlayerClient pc,
short indexOfDevice)
Constructor for AudioInterface. |
|
| Method Summary | |
|---|---|
int[] |
getFiveHighestAmplitudes()
Returns the five highest amplitudes. |
int[] |
getFiveHighestFrequencies()
Returns the five highest frequencies. |
void |
produceSound(short freq,
short amp,
short duration)
The audio interface accepts commands to produce fixed-frequency tones through /dev/dsp (which is assumed to be associated with a sound card to which a speaker is attached). |
void |
readData()
The audio interface reads the audio stream from /dev/audio (which is assumed to be associated with a sound card connected to a microphone) and performs some analysis on it. |
| Methods inherited from class javaclient.PlayerDevice |
|---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioInterface(PlayerClient pc,
short indexOfDevice)
pc - a reference to the PlayerClient objectindexOfDevice - the index of the device| Method Detail |
|---|
public void readData()
readData in class PlayerDevicepublic int[] getFiveHighestFrequencies()
public int[] getFiveHighestAmplitudes()
public void produceSound(short freq,
short amp,
short duration)
freq - frequency to play (Hz?)amp - amplitude to play (dB?)duration - duration to play (sec?)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||