|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.util.SpikeSound
public class SpikeSound
Plays a spike sound on the speaker. Use it by constructing a new SpikeSound
, then calling the play()
method.
Field Summary | |
---|---|
static javax.sound.sampled.AudioFormat |
audioFormat
|
static float |
SAMPLE_RATE
sample rate in Hz |
static byte |
SPIKE_AMPLITUDE
amplitude of spike sound. |
static int |
SPIKE_BUFFER_LENGTH
length of spike sound sample in samples. |
static int |
SPIKE_DURATION_MS
duration of spike sound in ms |
Constructor Summary | |
---|---|
SpikeSound()
Creates a new instance of SpikeSound |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
void |
play()
plays the spike sound once. |
void |
play(int leftRight)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SPIKE_DURATION_MS
public static final float SAMPLE_RATE
public static int SPIKE_BUFFER_LENGTH
SAMPLE_RATE
.
e.g., with a sample rate of 4kHz, 8 sample spikes make the spikes 2ms long. This seems about right.
public static final byte SPIKE_AMPLITUDE
public static javax.sound.sampled.AudioFormat audioFormat
Constructor Detail |
---|
public SpikeSound()
Method Detail |
---|
public void play()
public void play(int leftRight)
leftRight
- 0 to play left, 1 to play rightpublic static void main(java.lang.String[] args)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |