The Physiologist's Friend Simulation API

ch.unizh.ini.friend.gui
Class SpikeSound

java.lang.Object
  extended by ch.unizh.ini.friend.gui.SpikeSound

public class SpikeSound
extends Object

Plays a spike sound on the speaker. Use it by constructing a new SpikeSound, then calling the play() method.

Version:
$Revision: 1.8 $
Author:
tobi

Field Summary
static float SAMPLE_RATE
          sample rate in Hz
static byte SPIKE_AMPLITUDE
          amplitude of spike sound.
static int SPIKE_DURATION_MS
          duration of spike sound in ms
 
Constructor Summary
SpikeSound()
          Creates a new instance of SpikeSound
 
Method Summary
 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

SPIKE_DURATION_MS

public static final int SPIKE_DURATION_MS
duration of spike sound in ms

See Also:
Constant Field Values

SAMPLE_RATE

public static final float SAMPLE_RATE
sample rate in Hz

See Also:
Constant Field Values

SPIKE_AMPLITUDE

public static final byte SPIKE_AMPLITUDE
amplitude of spike sound.

See Also:
Constant Field Values
Constructor Detail

SpikeSound

public SpikeSound()
Creates a new instance of SpikeSound

Method Detail

play

public void play()
plays the spike sound once. Has a problem that it seems to recirculate the sound forever...


play

public void play(int leftRight)
Parameters:
leftRight - 0 to play left, 1 to play right

http://www.ini.unizh.ch/~tobi/friend